setItem

abstract fun setItem(key: String, value: String, callback: (DeviceStorageErrorMessage?, Boolean?) -> Unit): DeviceStorage

Stores a key-value pair.

Parameters

key

The key to store the value under.

value

The value to store.

callback

A callback function that is called when the operation is complete. The first argument is an error object, if any, and the second argument is a boolean indicating whether the operation was successful.