0

How do I access the SIM serial number and IMSI in Android?

Ragunath Jawahar
  • 19,115
  • 21
  • 107
  • 154

2 Answers2

1

You can get sim details using the following code

mTelephonyMgr = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
            String imei = mTelephonyMgr.getDeviceId();
            String country= mTelephonyMgr.getSimCountryIso();
            String SimOperator =mTelephonyMgr.getSimOperatorName();
            String SimSerialNumber= mTelephonyMgr.getSimSerialNumber();
            int SimState= mTelephonyMgr.getSimState();
            String SubscriberId= mTelephonyMgr.getSubscriberId();
            String DeviceId= mTelephonyMgr.getDeviceId();
            String mob=mTelephonyMgr.getLine1Number();
Arun Chand
  • 384
  • 4
  • 18
1

Check this Access the SIM Card with an Android Application?

Community
  • 1
  • 1
Mikpa
  • 1,902
  • 15
  • 20