react-native-get-imei
v1.0.1
Published
## Getting started
Downloads
21
Readme
react-native-get-imei
Getting started
$ npm install react-native-get-imei --save
Mostly automatic installation
$ react-native link react-native-get-imei
Manual installation
Android
- Open up
android/app/src/main/java/[...]/MainApplication.java
- Add
import com.xen0m.rn.plugin.getimei.RNGetImeiPackage;
to the imports at the top of the file - Add
new RNGetImeiPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-get-imei' project(':react-native-get-imei').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-get-imei/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-get-imei')
Usage
import RNGetImei from 'react-native-get-imei';
RNGetImei.getImei().then((result) => {
console.log(result);
});