Android Utililty Methods SharedPreferences Get

List of utility methods to do SharedPreferences Get

Description

The list of methods to do SharedPreferences Get are organized into topic(s).

Method

byte[]getPinHashFromPreferences(SharedPreferences prefs)
get Pin Hash From Preferences
return decode(getStringFromPrefsOrThow(prefs, KEY_PINPUT_PIN_HASH));
booleanisRegistrationExpired(SharedPreferences prefs)
Checks if the registration has expired.
long expirationTime = prefs.getLong(
        PROPERTY_ON_SERVER_EXPIRATION_TIME, -1);
return System.currentTimeMillis() > expirationTime;
voidasyncCommit( final SharedPreferences.Editor editor)
async Commit
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) {
    editor.apply();
} else {
    new AsyncTask<Void, Void, Void>() {
        @Override
        protected Void doInBackground(Void... params) {
            editor.commit();
            return null;
...