# nativescript-android-preferences

> A NativeScript plugin that allows to use the application's preferences on Android.

Latest version **1.0.3** (published 2016-10-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install nativescript-android-preferences
pnpm add nativescript-android-preferences
yarn add nativescript-android-preferences
bun add nativescript-android-preferences
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2016-10-12 |
| First published | 2016-10-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Elsa Rodriguez Plaza |
| Maintainers | elsamrodco |
| Keywords | NativeScript, android-preferences, NativeScript, native, script, android, custom, preferences, SharedPreferences, persistent, storage |

## Links

- npm: https://www.npmjs.com/package/nativescript-android-preferences
- Repository: https://github.com/elsamrodco/nativescript-android-preferences
- Issues: https://github.com/elsamrodco/nativescript-android-preferences/issues
- npm.io page: https://npm.io/package/nativescript-android-preferences

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 1.0.3 (latest) — 2016-10-12
- 1.0.2 — 2016-10-12
- 1.0.1 — 2016-10-11
- 1.0.0 — 2016-10-11

## README

# NativeScript-Android-preferences
A NativeScript plugin that allows to use the application's preferences on Android.

## License
This plugin is licensed under the MITlicense by Elsa Rodriguez Plaza

## Installation
`tns plugin add nativescript-android-preferences`

## Usages
 For more details on how to use this plugin, take a look at the demo application
 ```XML
<Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatingTo="onNavigatingTo">
  <StackLayout>
    <Label text="Android App Save Preferences" class="title"/>
    <Button text="Save String" tap="{{ onTapString }}" />
  </StackLayout>
</Page>
```

```JavaScript
var pref = require("nativescript-android-preferences");
onTapString = function () {
        var options = {
            datavalue: "StringPreference",
            datatype: pref.DataTypes.STRING,
            prefname: "String_Preference"
        }
        pref.SavePreference(options);
        options.datavalue = "DefStringPreference";
        alert("String Preference saved:"+pref.GetPreference(options));
    }
```

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