SharedPreferencesStorage

class SharedPreferencesStorage(context: Context, purpose: String) : Storage

Constructors

Link copied to clipboard
constructor(context: Context, purpose: String)

Functions

Link copied to clipboard
open override fun clear(): Boolean

Clear out all values from storage.

Link copied to clipboard
open override fun getBoolean(key: String, defaultValue: Boolean): Boolean

Retrieve a Boolean from app storage by a key.

Link copied to clipboard
open override fun getFloat(key: String, defaultValue: Float): Float

Retrieve a Float from app storage by a key.

Link copied to clipboard
open override fun getInt(key: String, defaultValue: Int): Int

Retrieve an Int from app storage by a key.

Link copied to clipboard
open override fun getLong(key: String, defaultValue: Long): Long

Retrieve a Long from app storage by a key.

Link copied to clipboard
open override fun getString(key: String, defaultValue: String): String

Retrieve a String from app storage by a key.

Link copied to clipboard
open override fun remove(key: String): Boolean

Clears out a single value from storage.

Link copied to clipboard
open override fun storeValue(key: String, value: Boolean): Boolean

Store a Boolean in app storage by a key.

open override fun storeValue(key: String, value: Float): Boolean

Store a Float in app storage by a key.

open override fun storeValue(key: String, value: Int): Boolean

Store an Int in app storage by a key.

open override fun storeValue(key: String, value: Long): Boolean

Store a Long in app storage by a key.

open override fun storeValue(key: String, value: String): Boolean

Store a String in app storage by a key.