Last active
March 17, 2020 23:36
-
-
Save amsterdatech/4dda17fd09430b6312db445d1f80e89e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Add permission to AndroidManifest.xml | |
<uses-permission android:name=”android.permission.READ_PHONE_STATE”/> | |
//IMEI/IMSI/ESN/PhoneNumber | |
val telephonyManager = context.getSystemService(Context.TELEPHONY_SERVICE) | |
val imei = telephonyManager.getDeviceId() | |
val simSerial = telephonyManager.getSimSerialNumber() | |
val imsi = telephonyManager.getSubscriberId() | |
val phoneNumber = telephonyManager.getLine1Number() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment