How to Get Imei from Android or Iphone
For android it's pretty straight forward. You just have to add read phone state permission. <uses-permission android:name="and...
https://www.czetsuyatech.com/2011/02/android-get-imei.html
For android it's pretty straight forward. You just have to add read phone state permission.
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
And call the API:
For iPhone I guess IMEI is not accessible as you could read on most articles. But perhaps you can use the device unique identifier.
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
And call the API:
String imei = TelephonyManager.getDefault().getDeviceId(); if (TextUtils.isEmpty(imei)) { return ""; }
For iPhone I guess IMEI is not accessible as you could read on most articles. But perhaps you can use the device unique identifier.
UIDevice *myDevice = [UIDevice currentDevice]; NSString *deviceUDID = [myDevice uniqueIdentifier];
Post a Comment