Storage

interface Storage(source)

Per-plugin persistent key/value storage. Obtain it from storage.

Space is capped by default at 256 KiB per plugin and 1 MiB for all plugins; the unit's persistent partition is small and shared with the stock HMI. Values are strings, so parse them defensively: they may come from an older version of your plugin.

Since

api 1

Functions

Link copied to clipboard
abstract fun get(key: String, def: String): String
Reads a value.
Link copied to clipboard
abstract fun put(key: String, value: String)
Stores a value, or removes the key when value is null.
Link copied to clipboard
abstract fun remove(key: String)
Removes a key.