在Android的主Activity的初始化函数中添加:
TelephonyManager tm = (TelephonyManager) this .getSystemService(TELEPHONY_SERVICE); String SubscriberId = tm.getSubscriberId(); if (SubscriberId != null && SubscriberId != "null") { if (SubscriberId.startsWith("46001")) { // 联通 } else if (SubscriberId.startsWith("46003")) { // 电信 } else { // 移动 } }