我正在开发一个应用程序,我需要根据需要执行的调用来检查类型SIM。我能够获得网络类型,但我无法获得他正在使用的SIM卡的类型。如何识别SIM卡的类型?
0
A
回答
1
确定SIM卡SIM卡的类型/ UIM/USIM:
// Get SIMType
The string simType = "unknown";
// Get the system, to obtain the sim data
TelephonyManager tm = (TelephonyManager) context.getSystemService (Context.TELEPHONY_SERVICE);
// Get the cell phone SIMType
int type = tm.getNetworkType();
// Determine the type of value, and named
if (type == TelephonyManager.NETWORK_TYPE_UMTS) {
simType = "USIM";
// Type defined for UMTS USIM card for wcdma
} Else if (type == TelephonyManager.NETWORK_TYPE_GPRS) {
simType = "SIM";
// Type defined for GPRS GPRS SIM card
} Else if (
type == TelephonyManager.NETWORK_TYPE_EDGE) {
simType = "SIM";
// Type defined for EDGE-EDGE SIM card
} Else {
simType = "UIM";
// Type is unknown definition of UIM card for cdma
}
2
多德使用
TelephonyManager telephone = (TelephonyManager)getSystemService(TELEPHONY_SERVICE);
String sim_nul = telephone.getSimSerialNumber();
String op_name = telephone.getNetworkOperatorName();
这里U将得到SIM卡号码以及操作名称,如沃达丰等
2
final TelephonyManagertm(TelephonyManager)getBaseContext().getSystemService
(Context.TELEPHONY_SERVICE);
String deviceid = tm.getDeviceId();
String sim_operatorname=tm.getSimOperatorName();
String sim_number=tm.getSimSerialNumber();
String manufacturer_name =Build.MANUFACTURER.toString().trim();
相关问题
- 1. 如何识别泛型类?
- 2. Android:如何获取双SIM卡手机中的SIM卡的SIM卡号码
- 3. 如何让SAK识别使用JAVA的智能卡类型?
- 4. 如何知道Android手机中的SIM卡类型(2G,3G)
- 5. card.io能识别哪些卡片类型? card.io是否支持识别商户卡?
- 6. 如何识别numpy的整数类型?
- 7. iPhone sdk:如何识别ZbarSymbol的类型
- 8. 如何识别URL的认证类型?
- 9. 如何在双SIM卡插槽中更改SIM卡的信息?
- 10. Android:如何在Android中获取两张SIM卡的SIM卡ID?
- 11. 如何检测SIM卡1或SIM卡2上的呼叫
- 12. paypal rest sdk如何识别哪个卡号属于哪种卡类型?
- 13. 如何使用SIM卡或
- 14. 如何识别安装程序类型?
- 15. 如何识别帐户类型
- 16. PostgreSQL:如何识别数据类型?
- 17. SharePoint如何识别文件类型?
- 18. SPSS AnswerTree如何识别变量类型?
- 19. JdbcTemplate如何识别数据类型?
- 20. 如何识别儿童输入类型
- 21. 的SIM卡
- 22. 识别webservice的类型
- 23. 识别滚动的类型
- 24. 识别sklearn模型的类
- 25. 无法识别的类型
- 26. 如何识别模板中的类型名称类型?
- 27. 从双SIM卡手机中的每张SIM卡分别读取联系人
- 28. 如何识别类类型以将shared_ptr转换为该类型
- 29. 双SIM卡更改默认SIM卡
- 30. RFID卡识别