# cordova-plugin-sharedpref

> Cordova Shared preference plugin

Latest version **0.0.3** (published 2015-11-26) · Apache 2.0 license · 0 weekly downloads

## Install

```sh
npm install cordova-plugin-sharedpref
pnpm add cordova-plugin-sharedpref
yarn add cordova-plugin-sharedpref
bun add cordova-plugin-sharedpref
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2015-11-26 |
| First published | 2015-11-26 |
| Weekly downloads | 0 |
| License | Apache 2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Kholil Mohammad Fazley |
| Maintainers | fazleykholil |
| Keywords | ecosystem:cordova, cordova-android, Shared, Shared preference, data, storage, Preferences |

## Links

- npm: https://www.npmjs.com/package/cordova-plugin-sharedpref
- Repository: https://github.com/fazleyKholil/SharedPreferences
- Homepage: https://github.com/fazleyKholil/SharedPreferences#readme
- Issues: https://github.com/fazleyKholil/SharedPreferences/issues
- npm.io page: https://npm.io/package/cordova-plugin-sharedpref

## Alternatives

- [gamedig](https://npm.io/package/gamedig.md) — 29.3K weekly downloads
- [join-monster](https://npm.io/package/join-monster.md) — 12.8K weekly downloads
- [masked](https://npm.io/package/masked.md) — 5.5K weekly downloads
- [@comunica/actor-query-process-explain-logical](https://npm.io/package/@comunica/actor-query-process-explain-logical.md) — 4.7K weekly downloads
- [@veracity/vui](https://npm.io/package/@veracity/vui.md) — 4.6K weekly downloads

## Recent versions

- 0.0.3 (latest) — 2015-11-26

## README

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 :
```html
  <script type="text/javascript" src="SharedPref.js"></script>
```

```javascript

/**
* 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

---
_Source: https://npm.io/package/cordova-plugin-sharedpref · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
