Display pop up once, on 4th app start

This commit is contained in:
Neslihan 2017-07-26 14:06:49 +03:00
parent 4571482695
commit 452dcaec72
2 changed files with 6 additions and 15 deletions

View file

@ -140,8 +140,10 @@ public class CommonsApplication extends Application {
System.setProperty("in.yuvi.http.fluent.PROGRESS_TRIGGER_THRESHOLD", "3.0");
Fresco.initialize(this);
PreferenceManager.getDefaultSharedPreferences(CommonsApplication.getInstance()).edit()
.putBoolean("is_app_started", true).commit();
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(
CommonsApplication.getInstance());
// Increase counter by one, starts from 1
prefs.edit().putInt("app_start_counter", prefs.getInt("app_start_counter" ,0) + 1).commit();
//For caching area -> categories
cacheData = new CacheController();