<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
TelephonyManager telMgr = (TelephonyManager)getSystemService(TELEPHONY_SERVICE);
if(telMgr.getSimState()==telMgr.SIM_STATE_READY)
{
//SIM卡:状态"良好");
}
else if(telMgr.getSimState()==telMgr.SIM_STATE_ABSENT)
{
//SIM卡:状态"无SIM卡");
}
else
{
//"SIM卡被锁定或未知的状态");
}
if(telMgr.getSimSerialNumber()!=null)
{
//SIM卡号码: telMgr.getSimSerialNumber());
}
else
{
//SIM卡号码: ("无法取得");
}
String opName=telMgr.getSimOperatorName(); //运行商名字