标签:
在Android的主Activity的初始化函数中添加:
TelephonyManager tm = (TelephonyManager) this
.getSystemService(TELEPHONY_SERVICE);
SubscriberId = tm.getSubscriberId();
if (SubscriberId != null && SubscriberId != "null") {
if (SubscriberId.startsWith("46001")) {
// 联通
} else if (SubscriberId.startsWith("46003")) {
// 电信
} else {
// 移动
}
}
标签:
原文地址:http://www.cnblogs.com/Colored-Mr/p/4317291.html