Key code:
Telephonymanager TM = (Telephonymanager) this.getsystemservice (Context.telephony_service);
String IMEI = Tm.getdeviceid (); Remove IMEI
String Tel = tm.getline1number (); Remove the MSISDN, which is likely to be empty
String iccid =tm.getsimserialnumber (); Remove Iccid
String imsi =tm.getsubscriberid (); Remove IMSI
To add permissions:
<uses-permission android:name= "Android.permission.READ_PHONE_STATE"/>
Iccid:integrate Circuit card identity IC Cards identification code (cured in SIM card)
Iccid is the unique identification number of the IC card, consisting of 20 digits,
The encoding format is: XXXXXX 0MFSS yygxx XXXXX.
Described below: Top six carrier code: China Mobile: 898600;898602, China Unicom: 898601, Chinese telecom 898603
Judgment code:
String short_str=iccid.substring (0, 6);
if (Short_str.equals ("898600") | | Short_str.equals ("898602")) {
String chanel= "Move";
}else if (short_str.equals ("898601")) {
String chanel= "telecommunications";
}else if (short_str.equals ("898603")) {
String chanel= "Unicom";
}
Read SIM card related information