How to find out the mobile operator of Android?

15

I'm developing an application in eclipse and I want it to work only on devices from a particular carrier. Any ideas how to check the carrier?

    
asked by anonymous 31.01.2015 / 09:50

1 answer

14

Android provides the class TelephonyManager that allows you to access information related to the telephone service.

It has methods that allow access to some types of subscriber information. Among them is the getNetworkOperatorName () that returns the information you want .

TelephonyManager manager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
String nomeOperadora = manager.getNetworkOperatorName();
    
31.01.2015 / 11:28