PersistentStorage

Storage that persists across app (re)installs. Data can be restored after reinstall, or on a new device if the user restored the app from a backup.

Functions

Link copied to clipboard

Checks the availability of persistent storage on this device.

Link copied to clipboard
abstract suspend fun clear(key: PersistentStorageKey): Result<Unit>

Clears data for the given key.

Link copied to clipboard
abstract suspend fun retrieve(key: PersistentStorageKey): Result<ByteArray?>

Retrieves data for a given key.

Link copied to clipboard
abstract suspend fun store(key: PersistentStorageKey, value: ByteArray): Result<Unit>

Stores data for the given key.