How to discover the mobile operator of Android?

Asked

Viewed 693 times

15

I’m developing an app on Eclipse and I want it to work only on devices of a particular carrier.

Any idea how to check the operator?

  • 3

    Take a look at [tour]. Did you know that you can vote for anything on the site and can accept an answer given in questions asked by you? It would be nice if you could review your questions and see if any answers deserve the vote and acceptance.

1 answer

14

Android provides the class Telephonymanager providing access to information relating 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();

Browser other questions tagged

You are not signed in. Login or sign up in order to post.