privatevoid getOperatorName(){
TelephonyManager tm =(TelephonyManager) getSystemService(TELEPHONY_SERVICE);
String operator = tm.getSimOperator();
if (operator != null) {
if (operator.equals("46000") || operator.equals("46002") || operator.equals("46007")) {
///移动
sim_version = 1;
}elseif (operator.equals("46001") || operator.equals("46006") ) {
///联通
sim_version = 2;
}elseif (operator.equals("46003") || operator.equals("46005")) {
///电信
sim_version = 3;
}
}else{
handle.sendEmptyMessage(9999);
}
}
Oncreate中调用此函数