Showing Terms And Conditions For First Time In An Android App
I am developing an android app in which the first screen is the splash screen. If the user is a first time user(meaning the app was just installed) I have to show the terms and con
Solution 1:
You don't need to have this counter:
SharedPreferencesprefs= PreferenceManager.getDefaultSharedPreferences(context);
if(!prefs.getBoolean(KEY_EULA_ACCEPTED, false)) {
showEula();
// Determine if EULA was accepted this time
prefs.edit().putBoolean(KEY_EULA_ACCEPTED, true).commit();
}
Solution 2:
You could use SharedPreferences (tutorial).
Just check for a certain value onCreate(). If it's not there, do something, then set the value. Next time, the value will be there and you can skip it.
Post a Comment for "Showing Terms And Conditions For First Time In An Android App"