A react native library for Android, will return IMEI (International Mobile Equipment Identity) when app is being run on an Android device and has READ_PHONE_STATE permission.
IMEI is guaranteed to be non-empty string, otherwise you will get an exception.
Exception is thrown if:
- Permission is missing
- Fails to get non-empty imei
- Device is not Android device
npm install react-native-imei --save # or with yarn yarn add react-native-imei # Remember to link after install! react-native link react-native-imei
Google Play has fairly strict rules regarding the use of hardware identifiers such as IMEI numbers. Make sure your use of this library is compliant with current policies if you plan to distribute your Android app using Google Play.
This library does not support iOS devices. Apple does not allow apps to access device identiying information such as IMEI. For more information please look at this StackOverflow question.