hotchemi.android.rate.OnClickButtonListener Java Examples
The following examples show how to use
hotchemi.android.rate.OnClickButtonListener.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MainActivity.java From AppPlus with MIT License | 6 votes |
private void rateApp() { AppRate.with(this) .setInstallDays(1) // default 10, 0 means install day. .setLaunchTimes(5) // default 10 .setRemindInterval(2) // default 1 .setShowLaterButton(true) // default true .setOnClickButtonListener(new OnClickButtonListener() { // callback listener. @Override public void onClickButton(int which) { MobclickAgent.onEvent(MainActivity.this, "rate_score_"+which); } }) .monitor(); // Show a dialog if meets conditions AppRate.showRateDialogIfMeetsConditions(this); }
Example #2
Source File: MainActivity.java From CarbonContacts with MIT License | 6 votes |
void AppRating(){ AppRate.with(this) .setInstallDays(0) // default 10, 0 means install day. .setLaunchTimes(1) // default 10 .setRemindInterval(1) // default 1 .setShowLaterButton(true) // default true .setDebug(false) // default false .setOnClickButtonListener(new OnClickButtonListener() { // callback listener. @Override public void onClickButton(int which) { Log.d(MainActivity.class.getName(), Integer.toString(which)); } }) .monitor(); // Show a dialog if meets conditions AppRate.showRateDialogIfMeetsConditions(this); AppRate.with(this).clearAgreeShowDialog(); }
Example #3
Source File: RateAppHelper.java From android with MIT License | 5 votes |
public static boolean showRateDialog(final Activity activity) { AppRate.with(activity) .setDialogStyle(R.style.PrkngDialogStyle) .setStoreType(AppRate.StoreType.GOOGLEPLAY) .setInstallDays(7) // default 10, 0 means install day. .setLaunchTimes(5) // default 10 times. .setRemindInterval(5) // default 1 day. .setShowLaterButton(true) // default true. .setDebug(false) // default false. .setCancelable(true) // default false. .setTitle(R.string.rate_dialog_title) .setMessage(R.string.rate_dialog_message) .setTextLater(R.string.rate_dialog_later_btn) .setTextNever(R.string.rate_dialog_never_btn) .setTextRateNow(R.string.rate_dialog_rate_now_btn) .setOnClickButtonListener(new OnClickButtonListener() { @Override public void onClickButton(int which) { if (which == DialogInterface.BUTTON_NEGATIVE) { try { activity.startActivity(getFeedbackIntent(activity)); } catch (Exception e) { Crashlytics.logException(e); } } } }) .monitor(); return AppRate.showRateDialogIfMeetsConditions(activity); }
Example #4
Source File: MainActivity.java From Android-Rate with MIT License | 5 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); AppRate.with(this) .setStoreType(StoreType.GOOGLEPLAY) //default is Google, other option is Amazon .setInstallDays(3) // default 10, 0 means install day. .setLaunchTimes(10) // default 10 times. .setRemindInterval(2) // default 1 day. .setShowLaterButton(true) // default true. .setDebug(true) // default false. .setCancelable(false) // default false. .setOnClickButtonListener(new OnClickButtonListener() { // callback listener. @Override public void onClickButton(int which) { Log.d(MainActivity.class.getName(), Integer.toString(which)); } }) .setTitle(R.string.new_rate_dialog_title) .setTextLater(R.string.new_rate_dialog_later) .setTextNever(R.string.new_rate_dialog_never) .setTextRateNow(R.string.new_rate_dialog_ok) .monitor(); AppRate.showRateDialogIfMeetsConditions(this); }