Module: Toybox.Application.Storage
Overview
The Storage module provides persistent storage to applications.
Storage provides access to persistent disk storage.
Instance Method Summary collapse
-
clearValues() as Void
Clear the object store for the application.
-
deleteValue(key as Application.PropertyKeyType) as Void
Delete the given key from the object store.
-
getValue(key as Application.PropertyKeyType) as Application.PropertyValueType
Get the data associated with a given key from the object store.
-
setValue(key as Application.PropertyKeyType, value as Application.PropertyValueType) as Void
Store the given data in the object.
Instance Method Details
clearValues() as Void
Clear the object store for the application.
deleteValue(key as Application.PropertyKeyType) as Void
Delete the given key from the object store.
getValue(key as Application.PropertyKeyType) as Application.PropertyValueType
Symbols can change from build to build and are not to be used for for Keys or Values
setValue(key as Application.PropertyKeyType, value as Application.PropertyValueType) as Void
Store the given data in the object.
Keys can be of the following types:
Values can be of the following types:
-
BitmapResource (Since 3.0.0)
-
AnimationResource (Since 3.0.8)
-
ScanResult (Since 3.2.0)
-
null
Values can also be of type Array or Dictionary containing the above listed types, excluding BitmapResource and AnimationResource. There is a limit on the size of the Object Store that can vary between devices. If you reach this limit, the value will not be saved and an exception will be thrown. Also, values are limited to 32 KB in size.
Symbols can change from build to build and are not to be used for for Keys or Values