Hierarchy
- IStorage
Methods
getItem
-
Get data from the server using a key.
Parameters
-
key: string
Returns Promise<string | null>
-
setItem
-
Save data to the server using a key.
The size of the value is limited: it must not exceed 16 megabytes.
await Application.storage.setItem('key', JSON.stringify({ 'some_key' : 'some_data', 'arr' : [ 1, 2, 3 ] })); // Further in the code, when data is requested let value = JSON.parse(await Application.storage.getItem('key'));
Parameters
-
key: string
Value key.
-
value: string
Data to be saved.
Returns Promise<void>
-
Long-term storage used to store any string data on the server