mars

SharedPreference

 

SharedPreference

Shared Preference is used to locally save data on the device.

Example

Using setData block to save a value of someValue with the key someKey.

example



Blocks

getData

Retrieve the saved data.

get data

TYPEEXPLANATIONREQUIRED
Shared PreferenceShared Preference ComponentYes
StringKey of the value you are trying to retrieveYes

setData

Save data with the key value pair.

set data

TYPEEXPLANATIONREQUIRED
Shared PreferenceShared Preference ComponentYes
StringKey valueYes
StringValue you are trying to saveYes

removeData

Remove the data with the key value.

remove data

TYPEEXPLANATIONREQUIRED
Shared PreferenceShared Preference ComponentYes
StringKey of the value you are trying to deleteYes

Post a Comment

0 Comments