Introduction
This module was produced by ClassApp Team and will be improved in future updates. react-native-get-shared-prefs
gets all information stored in Android shared preferences.
Install
Install react-native-get-shared-prefs
using:
npm i -S react-native-get-shared-prefs
After that, you should link react-native-get-shared-prefs
in your project, to do so:
rnpm link react-native-get-shared-prefs
or
Go to settings.gradle
inside your android project folder and paste this lines there:
include ':react-native-get-shared-prefs'.projectDir = new File(rootProject.projectDir, '../node_modules/react-native-get-shared-prefs/android')
and paste it into build.gradle
:
compile
In your MainActivity.java
add:
//<- You must import this protected List<ReactPackage> { return Arrays.<ReactPackage>;}
Sync gradle and go :)
How to use?
Here is a simple example:
; SharedPrefs;
Here is an output example:
Future Works
- Add more features