Created
September 13, 2016 23:01
-
-
Save brygom/ff444feb757dacc038cb5e64802604ad to your computer and use it in GitHub Desktop.
Get IMEI from ANDROID Application
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
| public class IMEI{ | |
| public String getIMEI(){ | |
| //add | |
| //<uses-permission android:name="android.permission.READ_PHONE_STATE" /> | |
| //in manifest | |
| TelephonyManager tm = (TelephonyManager)getSystemService(TELEPHONY_SERVICE); | |
| String imei= tm.getDeviceId(); | |
| return imei; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment