-
- All Implemented Interfaces:
-
com.auth0.android.authentication.storage.Storage
public final class SharedPreferencesStorage implements Storage
An implementation of Storage that uses android.content.SharedPreferences in Context.MODE_PRIVATE to store the values.
-
-
Constructor Summary
Constructors Constructor Description SharedPreferencesStorage(Context context, String sharedPreferencesName)
-
Method Summary
Modifier and Type Method Description Unit
store(String name, Long value)
Store a given value in the Storage. Unit
store(String name, Integer value)
Store a given value in the Storage. Unit
store(String name, String value)
Store a given value in the Storage. Unit
store(String name, Boolean value)
Store a given value in the Storage. Long
retrieveLong(String name)
Retrieve a value from the Storage. String
retrieveString(String name)
Retrieve a value from the Storage. Integer
retrieveInteger(String name)
Retrieve a value from the Storage. Boolean
retrieveBoolean(String name)
Retrieve a value from the Storage. Unit
remove(String name)
Removes a value from the storage. -
-
Method Detail
-
store
Unit store(String name, Long value)
Store a given value in the Storage.
- Parameters:
name
- the name of the value to store.value
- the value to store.
-
store
Unit store(String name, Integer value)
Store a given value in the Storage.
- Parameters:
name
- the name of the value to store.value
- the value to store.
-
store
Unit store(String name, String value)
Store a given value in the Storage.
- Parameters:
name
- the name of the value to store.value
- the value to store.
-
store
Unit store(String name, Boolean value)
Store a given value in the Storage.
- Parameters:
name
- the name of the value to store.value
- the value to store.
-
retrieveLong
Long retrieveLong(String name)
Retrieve a value from the Storage.
- Parameters:
name
- the name of the value to retrieve.
-
retrieveString
String retrieveString(String name)
Retrieve a value from the Storage.
- Parameters:
name
- the name of the value to retrieve.
-
retrieveInteger
Integer retrieveInteger(String name)
Retrieve a value from the Storage.
- Parameters:
name
- the name of the value to retrieve.
-
retrieveBoolean
Boolean retrieveBoolean(String name)
Retrieve a value from the Storage.
- Parameters:
name
- the name of the value to retrieve.
-
-
-
-