Back

titanium 插件:推荐 ( rate your app )

发布时间: 2015-01-11 01:41:00

refer to:  https://github.com/FokkeZB/UTiL/tree/master/rate  ( apple, android 都可以,记得使用前要看源代码)

要求用户来为你的app 做推荐是非常重要的。

时机也需要把握的比较好。错误的做法会让用户引起反感。所以:

1. 默认的话,是运行3天后, 并且至少执行了3次之后,才会弹出让用户推荐的菜单。

代码:

require('rate').plus();

2. 最好,在某些让用户感到喜欢的页面,弹出推荐菜单。 也可以使用 “计数器”来配置。

例如:

var rate = require('rate');

// Set texts
rate.title = 'Pleeeeease rate!';
rate.message = 'I would be so thankful!';
rate.yes = 'Fine';
rate.later = 'Maybe later';
rate.never = 'Forget it';

// Set triggers
rate.pointsBetween = 100; // Points before asking and between each retry
rate.daysBetween = 10; // Days before asking and between each retry
rate.eachVersion = true; // Ask again every version (unless user chose 'never')

// Set Apple ID (found in iTunes Connect) manually
rate.appleId = 123456;

// Reset all triggers (including if user chose 'never', so be aware!)
rate.reset();  // 重置计数器

// Add 1 point and test if we should ask (returns TRUE if question was aked)
rate.plus();  // 让计数器 +1 

// Add more points and do not test
rate.plus(5, false);

// Just test (returns TRUE if question was aked)
// 看看计数器是否满足要求。 如果满足的话,就会弹出 “推荐 app“的窗口。
rate.test(); 

// 不考虑计数器,直接弹出“推荐APP”的窗口
rate.open();

Back