How to find out carrier's name in Android
Never used it myself, but take a look at TelephonyManager->getNetworkOperatorName().
You could try something as simple as this:
TelephonyManager manager = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
String carrierName = manager.getNetworkOperatorName();
TelephonyManager telephonyManager = ((TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE));
String operatorName = telephonyManager.getNetworkOperatorName();
In case one needs the Carrier name of the Operator as shown on the Notifications bar as @Waza_Be asked. One could use the getSimOperatorName method instead, as several Telcos sublease their Network to other companies.
TelephonyManager telephonyManager = ((TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE));
String simOperatorName = telephonyManager.getSimOperatorName();
A Kotlin null safe implementation:
val operatorName = (context.getSystemService(Context.TELEPHONY_SERVICE) as? TelephonyManager)?.networkOperatorName ?: "unknown"