TelephonyManager tm = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
if(tm != null)
carrier = tm.getNetworkOperatorName();我只想知道网络运营商的名字,叫“运营商”。但始终在android 6设备上返回"“。有什么解决方案吗?
发布于 2016-12-07 13:35:05
//Here is snippet, hope it helps you!
TelephonyManager tManager = (TelephonyManager) getBaseContext().getSystemService(Context.TELEPHONY_SERVICE);
// Get carrier name (Network Operator Name)
String carrierName = tManager.getNetworkOperatorName();
String operatorName = tManager.getSimOperatorName(); //try this
// Get Phone model and manufacturer name
String manufacturer = Build.MANUFACTURER;
String model = Build.MODEL;https://stackoverflow.com/questions/41010041
复制相似问题