1.0.1 • Published 6 years ago

react-native-get-imei v1.0.1

Weekly downloads
18
License
-
Repository
-
Last release
6 years ago

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);
});