0

Currently I was working on an app and I wanted to add a function to keep track of the type of telco/service provider they are on for analytic purpose. But i found out that if the user using on a tablet with mobile internet (eg. nexus 7 3g), i won't be able to get the name for service provider. I've tried getSimOperator() and getNetworkOperatorName() and both returning null values. Is there any way possible to get the service provider name or is not possible for device that can't make phone call ?

Thanks in advance =)

Jun
  • 167
  • 1
  • 9

1 Answers1

1

If you read the documentation of getnetwordOperatorName() it says:

Returns the alphabetic name of current registered operator.

Availability: Only when user is registered to a network. Result may be unreliable on CDMA networks (use getPhoneType() to determine if on a CDMA network).

As you see that result may be unreliable for CDMA networks. So check if you are using CDMA. That's my one cents.

Shobhit Puri
  • 25,769
  • 11
  • 95
  • 124
  • it appears that is was my own mistake. I've accidentally turned on the airplane mode so it can get any values. Now i switch back to normal mode and it works. Btw thanks for your tips on the checking part too, it guided me to the right path although is not CDMA related. – Jun Nov 19 '13 at 03:44