By using this below method i am getting information of sim one
TelephonyManager telephonyManager = (TelephonyManager) this.getSystemService(Context.TELEPHONY_SERVICE);
// Get the SIM country ISO code
String simCountry = telephonyManager.getSimCountryIso();
Log.e("Show:", simCountry);
// Get the operator code of the active SIM (MCC + MNC)
String simOperatorCode = telephonyManager.getSimOperator();
Log.e("Show:", simOperatorCode);
// Get the name of the SIM operator
String simOperatorName = telephonyManager.getSimOperatorName();
Log.e("Show:", simOperatorName);
// Get the SIM’s serial number
String simSerial = telephonyManager.getSimSerialNumber();
Log.e("Show:", simSerial);
// Get the phone number
String mPhoneNumber = telephonyManager.getLine1Number();
Log.e("Show:", mPhoneNumber);
how to get information of second sim of dual sim phone?
// Get the phone number
String mPhoneNumber = telephonyManager.getLine1Number();
Log.e("Show:", mPhoneNumber);
work on some device
Permission:
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
So what should i do? Is there any Mistake?