Socket
Socket
Sign inDemoInstall

cordova-plugin-sharedpref

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    cordova-plugin-sharedpref

Cordova Shared preference plugin


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

cordova-plugin-sharedpref

=========

A small library providing utility methods to save and get a string to the native Shared preference of android

Installation

npm install cordova-plugin-sharedpref --save

Usage

In the index.html include :

  <script type="text/javascript" src="SharedPref.js"></script>

/**
* to save a value to the shared preference
* @param {string} type save or get
* @param {string} key the key to be stored
* @param {string} value The value/text to be stored
*/
SharedPref.arkPref("save", "name", "yovan juggoo", function (prefObj) {
    alert(JSON.stringify(prefObj));
 });
 
/**
* to get a value from the shared preference
* @param {string} type save or get
* @param {string} key the key to be stored
* @param {string}  " " an empty string
*/
SharedPref.arkPref("get", "name", " ", function (prefObj) {
    alert(prefObj.name);// .name is the key of the object received by the callback
});

Release History

  • 0.0.3 Initial release

Keywords

FAQs

Last updated on 26 Nov 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc