1.2.0 • Published 6 years ago
cordova-plugin-my-shared-preferences v1.2.0
Shared Preferences
With this plugin you can read and write to the Shared Preferences in your cordova application.
Installation
$ cordova plugin add cordova-plugin-my-shared-preferences
Usage
Cordova
Set the name of the file for your preferences:
window.plugins.MySharedPreferences.setFileName(name, [successCallback, errorCallback]);
Get the value of the preference:
window.plugins.MySharedPreferences.getPreference(key, [successCallback, errorCallback]);
Set a new value of the preference:
window.plugins.MySharedPreferences.setPreference(key, value, [successCallback, errorCallback]);
Get all preferences:
window.plugins.MySharedPreferences.getAllPreferences([successCallback, errorCallback]);
Ionic
To use this plugin in Ionic project, you need to install the corresponding npm module: App Preferences