Java Code Examples for net.openid.appauth.AuthState#fromJson()
The following examples show how to use
net.openid.appauth.AuthState#fromJson() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MainActivity.java From appauth-android-codelab with Apache License 2.0 | 5 votes |
@Nullable private AuthState restoreAuthState() { String jsonString = getSharedPreferences(SHARED_PREFERENCES_NAME, Context.MODE_PRIVATE) .getString(AUTH_STATE, null); if (!TextUtils.isEmpty(jsonString)) { try { return AuthState.fromJson(jsonString); } catch (JSONException jsonException) { // should never happen } } return null; }
Example 2
Source File: MainActivity.java From appauth-android-codelab with Apache License 2.0 | 5 votes |
@Nullable private AuthState restoreAuthState() { String jsonString = getSharedPreferences(SHARED_PREFERENCES_NAME, Context.MODE_PRIVATE) .getString(AUTH_STATE, null); if (!TextUtils.isEmpty(jsonString)) { try { return AuthState.fromJson(jsonString); } catch (JSONException jsonException) { // should never happen } } return null; }
Example 3
Source File: MainActivity.java From appauth-android-codelab with Apache License 2.0 | 5 votes |
@Nullable private AuthState restoreAuthState() { String jsonString = getSharedPreferences(SHARED_PREFERENCES_NAME, Context.MODE_PRIVATE) .getString(AUTH_STATE, null); if (!TextUtils.isEmpty(jsonString)) { try { return AuthState.fromJson(jsonString); } catch (JSONException jsonException) { // should never happen } } return null; }