androidoperatorstelephonycarrier

How to find out carrier's name when using MVNO? (i want the one written in notification Bar)


I am just trying to get my carrier name.

The issue while trying to use:

TelephonyManager manager = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE));
String carrierName = manager.getNetworkOperatorName();

That is working great unless you are a MVNO (definition here: http://en.wikipedia.org/wiki/Mobile_virtual_network_operator)

For instance, in Belgium, we have the "Base" carrier that rent the network to some MVNO, like Toledo, Allo RTL, Mobile Vikings, etc...

In my notification bar, when using such virtual operators, I get their real names, but the code above just give me "Base" as String, and not the one I want.

I hope you understand what I mean.


Solution

  • I don't have a MVNO SIM card but the getSimOperatorName() method of the TelephonyManager might be the method you are looking for.

    TelephonyManager manager = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
    String carrierName = manager.geSimOperatorName();
    

    I have a MVNE SIM card in Germany and the method returns an empty String, but the getNetworkOperatorName() method returns the right Operator for my SIM card.