public boolean shouldShowRateDialog() { return getIsAgreeShowDialog(context) && isOverLaunchTimes() && isOverInstallDate() && isOverRemindDate(); }
@Override public void onClick(DialogInterface dialog, int which) { setRemindInterval(context); if (listener != null) listener.onClickButton(which); } });
@Override public void onClick(DialogInterface dialog, int which) { setAgreeShowDialog(context, false); if (listener != null) listener.onClickButton(which); } });
@Override public void onClick(DialogInterface dialog, int which) { final Intent intentToAppstore = options.getStoreType() == StoreType.GOOGLEPLAY ? createIntentForGooglePlay(context) : createIntentForAmazonAppstore(context); context.startActivity(intentToAppstore); setAgreeShowDialog(context, false); if (listener != null) listener.onClickButton(which); } });
public void monitor() { if (isFirstLaunch(context)) { setInstallDate(context); } PreferenceHelper.setLaunchTimes(context, getLaunchTimes(context) + 1); }
private boolean isOverInstallDate() { return isOverDate(getInstallDate(context), installDate); }
private boolean isOverRemindDate() { return isOverDate(getRemindInterval(context), remindInterval); }
public static boolean showRateDialogIfMeetsConditions(Activity activity) { boolean isMeetsConditions = singleton.isDebug || singleton.shouldShowRateDialog(); if (isMeetsConditions) { singleton.showRateDialog(activity); } return isMeetsConditions; }
public AppRate clearSettingsParam() { PreferenceHelper.setAgreeShowDialog(context, true); PreferenceHelper.clearSharedPreferences(context); return this; }
public static AppRate with(Context context) { if (singleton == null) { synchronized (AppRate.class) { if (singleton == null) { singleton = new AppRate(context); } } } return singleton; }
public AppRate setShowNeverButton(boolean isShowNeverButton) { options.setShowNegativeButton(isShowNeverButton); return this; }
public AppRate setTextNever(String negativeText) { options.setNegativeText(negativeText); return this; }
@Override public void onClick(DialogInterface dialog, int which) { final Intent intentToAppstore = options.getStoreType() == StoreType.GOOGLEPLAY ? createIntentForGooglePlay(context) : createIntentForAmazonAppstore(context); context.startActivity(intentToAppstore); setAgreeShowDialog(context, false); if (listener != null) listener.onClickButton(which); } });
public boolean shouldShowRateDialog() { return getIsAgreeShowDialog(context) && isOverLaunchTimes() && isOverInstallDate() && isOverRemindDate(); }
@Override public void onClick(DialogInterface dialog, int which) { setRemindInterval(context); if (listener != null) listener.onClickButton(which); } });
@Override public void onClick(DialogInterface dialog, int which) { setAgreeShowDialog(context, false); if (listener != null) listener.onClickButton(which); } });
private boolean isOverInstallDate() { return isOverDate(getInstallDate(context), installDate); }
private boolean isOverRemindDate() { return isOverDate(getRemindInterval(context), remindInterval); }
public static boolean showRateDialogIfMeetsConditions(Activity activity) { boolean isMeetsConditions = singleton.isDebug || singleton.shouldShowRateDialog(); if (isMeetsConditions) { singleton.showRateDialog(activity); } return isMeetsConditions; }
public static AppRate with(Context context) { if (singleton == null) { synchronized (AppRate.class) { if (singleton == null) { singleton = new AppRate(context); } } } return singleton; }