@connected-home/react-native-android-shared-preferences
Android Shared Preferences for React Native
Last updated a year ago by sandfox .
Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @connected-home/react-native-android-shared-preferences 
SYNC missed versions from official npm registry.

React Native Android Shared Preferences

Android Shared Preferences for React Native

Install

npm install @connected-home/react-native-android-shared-preferences --save
# or...
yarn add @connected-home/react-native-android-shared-preferences

Link

react-native link @connected-home/react-native-android-shared-preferences

Usage

Import

const SharedPreferences = require("react-native-android-shared-preferences");
// or...
import SharedPreferences from "react-native-android-shared-preferences";

Get item

SharedPreferences.getItem("file", "key", value => {
  ...
});

Get multiple items

SharedPreferences.getItems("file", ["key1", "key2"], values => {
  ...
});

Get keys

SharedPreferences.keys("file", keys => {
  ...
});

Get entries

SharedPreferences.entries("file", entries => {
  console.log(values);
});

Set Item

SharedPreferences.setItem("file", "key", "value");

Delete Item

SharedPreferences.deleteItem("file", "key");

Clear all items

SharedPreferences.clear("file");

Delete Prefs File

SharedPreferences.deleteFile("file");

Current Tags

  • 1.1.2                                ...           latest (a year ago)

4 Versions

  • 1.1.2                                ...           a year ago
  • 1.1.1                                ...           a year ago
  • 1.1.0                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |