Reputation: 23
TelephonyManager tm = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
if(tm != null)
carrier = tm.getNetworkOperatorName();
I just want to get network operator name which is called 'carrier'. But always return "" with android 6 device. Is there any solution?
Upvotes: 0
Views: 1860
Reputation: 454
//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;
Upvotes: 1