Created
November 27, 2016 06:07
-
-
Save layerlre/4bcff7fd90380d64176046f6640d7214 to your computer and use it in GitHub Desktop.
Get device IMEI and device ID
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
... | |
// GET DEVICE ID | |
final String deviceId = Secure.getString(getContentResolver(), | |
Secure.ANDROID_ID); | |
// GET IMEI NUMBER | |
TelephonyManager tManager = (TelephonyManager) getBaseContext() | |
.getSystemService(Context.TELEPHONY_SERVICE); | |
String deviceIMEI = tManager.getDeviceId(); | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment