diff --git a/library/src/main/java/com/aitorvs/android/allowme/AllowMe.java b/library/src/main/java/com/aitorvs/android/allowme/AllowMe.java index b0cd085..9971f90 100644 --- a/library/src/main/java/com/aitorvs/android/allowme/AllowMe.java +++ b/library/src/main/java/com/aitorvs/android/allowme/AllowMe.java @@ -37,6 +37,7 @@ public class AllowMe { private static final String TAG = AllowMe.class.getSimpleName(); + private static final String ALLOWME_SHOULD_SHOW_PRIMING_KEY = TAG + ".key.should_show_priming"; private static AllowMe instance; private Activity mActivity; @@ -314,10 +315,10 @@ private void requestPermission(int requestCode) { public boolean shouldShowPrimingMessage() { SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(safeActivity()); - boolean value = sharedPreferences.getBoolean("should_show_priming", true); + boolean value = sharedPreferences.getBoolean(ALLOWME_SHOULD_SHOW_PRIMING_KEY, true); // we've been called, set it to false again - sharedPreferences.edit().putBoolean("should_show_priming", false).apply(); + sharedPreferences.edit().putBoolean(ALLOWME_SHOULD_SHOW_PRIMING_KEY, false).apply(); return value; }