-
-
Save virendersran01/8f5e9e6c7413a56dbaaf6ba81503bcf4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void firstTimeAskingPermission(Context context, String permission, boolean isFirstTime){ | |
SharedPreferences sharedPreference = context.getSharedPreferences(PREFS_FILE_NAME, MODE_PRIVATE; | |
sharedPreference.edit().putBoolean(permission, isFirstTime).apply(); | |
} | |
public static boolean isFirstTimeAskingPermission(Context context, String permission){ | |
return context.getSharedPreferences(PREFS_FILE_NAME, MODE_PRIVATE).getBoolean(permission, true); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment