Search in sources :

Example 1 with RateAppCounter

use of org.kiwix.kiwixmobile.utils.RateAppCounter in project kiwix-android by kiwix.

the class KiwixMobileActivity method checkForRateDialog.

private void checkForRateDialog() {
    isFirstRun = sharedPreferenceUtil.getPrefIsFirstRun();
    visitCounterPref = new RateAppCounter(this);
    tempVisitCount = visitCounterPref.getCount();
    ++tempVisitCount;
    visitCounterPref.setCount(tempVisitCount);
    if (tempVisitCount >= 5 && !visitCounterPref.getNoThanksState() && NetworkUtils.isNetworkAvailable(this) && !BuildConfig.DEBUG) {
        showRateDialog();
    }
}
Also used : RateAppCounter(org.kiwix.kiwixmobile.utils.RateAppCounter)

Aggregations

RateAppCounter (org.kiwix.kiwixmobile.utils.RateAppCounter)1