73081

knowing the network operator name

Question:

I want to get my network operator name in my app.

I am using fallowing methods in the TelephonyManager to get this:

TelephonyManager mTeleManager = (TelephonyManager) getSystemService(TELEPHONY_SERVICE); mTeleManager.getSimOperatorName(); mTeleManager.getNetworkOperatorName(); mTeleManager.getSimOperator()

But I am getting empty values from the "getSimOperatorName()" and "getNetworkOperatorName()".. I am getting numeric code from this "getSimOperator()" method, But I want know the alphabetic form of the operator name . Some thing like "T-Mobile" for Tmobile networks.

Pl. suggest me how to do this.

thanks.

Answer1:

Have you tried it on different phones/with different sim cards?

According to <a href="http://code.google.com/p/android/issues/detail?id=4339" rel="nofollow">TelephonyManager.getLine1Number() returns Null</a>

<blockquote>

Hi All,

Here comes an explanation for this. It is not actually an issue, both information depends on some fields on the SIM card that are optional. So it might be empty if the SIM has no such optional fields or if the operator has set it empty.

Regards,

</blockquote>

He is talking about

TelephonyManager.getLine1Number() TelephonyManager.getSimOperatorName()

Recommend

  • Printing the name of a variable
  • How to use Google Places API for Web Service in android?
  • IBM mobile app builder does not see documents in Cloudant database, why?
  • Media queries in CSS
  • Cordova InAppBrowser - Open popups from web within the InAppBrowser container
  • FB add friend dialog on mobile doesnt work
  • How to fit image in full screen in ImageViewTouch
  • Can we Create Smart Device Project in VIsual Studio 2015 Professional
  • Image resizing issue when keyboard open in android mobile
  • Connecting Couchbase sync adapter to couchdb server
  • Android WebView does not display web page correctly
  • $this->db->insert_id(); returning 0 every time in codeigniter [duplicate]
  • jQuery single page mobile app
  • Store specific data in variable from another variable with regex with PHP
  • How to negative match regex in JavaScript string replace? [duplicate]
  • Plot a table with R
  • Why are my web pages zoomed in when I open them in Opera Mobile?
  • Sticky Footer W/JQuery Mobile
  • cordova build android throws error on Ubuntu 12.04
  • addressing in assembler
  • Unique SMS sender id?
  • jQueryMobile, Ajax Navigation, and MVC
  • Which browser have this strange user agent? (IOS device)
  • Neo4j: Filter nodes based on aggregate function
  • What is corresponding c++ data type to SQL numeric(18,0) data type?
  • xtable package: Skipping some rows in the output
  • Jackson Parser: ignore deserializing for type mismatch
  • How to use remove-erase idiom for removing empty vectors in a vector?
  • Repeat a vertical line on every page in Report Builder / SSRS
  • Why is an OPTIONS request sent to the server?
  • Why doesn't :active or :focus work on text links in webkit? (safari & chrome)
  • Join two tables and save into third-sql
  • Convert array of 8 bytes to signed long in C++
  • jQuery tmpl and DataLink beta
  • SQL merge duplicate rows and join values that are different
  • Proper way to use connect-multiparty with express.js?
  • How to set the response of a form post action to a iframe source?
  • Understanding cpu registers
  • Recursive/Hierarchical Query Using Postgres
  • Running Map reduces the dimensions of the matrices