npm.io
1.0.1 • Published 8 years ago

react-native-get-imei

Licence
Version
1.0.1
Deps
0
Size
4.9 MB
Vulns
0
Weekly
0

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
  1. 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 the getPackages() method
  1. 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')
  2. 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);
});

Keywords