sharedpreferences-plugin
Mobile icon

Shared Preferences Plugin

Stable version 3.0.0 (Compatible with OutSystems 11)
Published on 04 January 2019 by 
5.0
 (7 ratings)
sharedpreferences-plugin

Shared Preferences Plugin

Documentation

Shared Preferences plugin allows you to save and retrieve data in the form of key,value pair.

This plugin supports both Android and iOS platforms.


Note: Shared Preferences plugin has no dependencies.


Before any other action, you need to check if the Shared Preferences plugin is available, and to accomplish that, you should use the action “CheckSharedPreferencesPlugin”. After that, and in the case of “success”. You can use the other actions available in this plugin.


How to use this plugin (Example):


Step 1) Open Service Studio, click on “Install Application”. You will be redirected to the forge page. You write the name of the component, in this case, Shared Preferences.


Step 2) After the download and installation are done, let’s create your application. Click on “New Application” and select “Mobile App”.


Step 3) After creating the application, click on “Manage Dependencies” and import the actions given by Shared Preferences Plugin.


The plugin provides the following actions


GET

  • GetText : Retrieves a text value for a specific preference set.
  • GetBoolean : Retrieves a boolean value for a specific preference set.
  • GetInteger : Retrieves a text value for a specific preference set.
  • GetLongInteger : Retrieves a long integer value for a specific preference set.
  • GetKeys: Retrieves the list of keys for a specific preference set.



SET

  • PutText: Sets a text value for a specific preference set.
  • PutBoolean: Sets a boolean value for a specific preference set.
  • PutInteger: Sets an integer value for a specific preference set.
  • PutLongInteger : Sets a long integer value for a specific preference set.



CHECK

  • CheckSharedPreferencesPlugin : Checks if the plugin is available for use.
  • HasKey : Checks if the specific preference set has the given key.



DELETE

  • DeleteKey : Removes the specific key for a specific preference set.
  • Clear : Removes all the keys from a specific preference set.


Note:  Supports more than one set of preferences. All the methods have an optional parameter "PreferenceName". If empty will refer to Default preference set.