Created
September 9, 2016 04:28
-
-
Save dmpatel151282/f8b05a2636eb36b8dea4441468c259cd to your computer and use it in GitHub Desktop.
This file contains 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 below permission in Androidmenifest.xml file. | |
<uses-permission android:name="android.permission.READ_PHONE_STATE"/> | |
Code snippet:- | |
TelephonyManager telephonyManager = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE); | |
String deviceID =telephonyManager.getDeviceId(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment