List of utility methods to do SharedPreferences Get
byte[] | getPinHashFromPreferences(SharedPreferences prefs) get Pin Hash From Preferences return decode(getStringFromPrefsOrThow(prefs, KEY_PINPUT_PIN_HASH));
|
boolean | isRegistrationExpired(SharedPreferences prefs) Checks if the registration has expired. long expirationTime = prefs.getLong( PROPERTY_ON_SERVER_EXPIRATION_TIME, -1); return System.currentTimeMillis() > expirationTime; |
void | asyncCommit( 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; ... |