After searching the API and no luck, mybe anyone know how could I retrieve the SIM ID of the device?
thanks,
ray.
Here is the code to get International Mobile Subscriber Identity (IMSI No.) id and phone id (IMEI No.) and Sim No. programmatically
Before doing this also set the user permission in the manifest file "android.permission.READ_PHONE_STATE"
TelephonyManager mTelephonyMgr = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
String imsi = mTelephonyMgr.getSubscriberId();
String imei = mTelephonyMgr.getDeviceId();
String simno = mTelephonyMgr.getSimSerialNumber();
Log.v("", ""+imsi);
Log.v("", ""+imei);
Log.v("", ""+simno);
Frrom wikiPedia
The Id = Issuer identification number (IIN) Maximum of seven digits: Major industry identifier (MII), 2 digits, 89 for telecommunication purposes. Country code, 1-3 digits, as defined by ITU-T recommendation E.164. Issuer identifier, 1-4 digits.
so the API is :
public String getSimCountryIso ()
public String getSimSerialNumber ()
public String getSubscriberId ()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With