4

I have been assigned a task to access mobile service provider name instead of location. I searched and referred to many things. But I couldn't find. All are shown about the location (that is latitude and longitude values) and some of them shows the network provider name. I need something like Cell Info Display Name.

Example: If I'm using Vodafone Network it will display the service provider name that my mobile is currently using.

I don't need to display location and place in map. I just exactly need to show the service provider name. Is there any method? Can anyone please explain via sample code?

MysticMagicϡ
  • 28,593
  • 16
  • 73
  • 124
user1954492
  • 495
  • 3
  • 13

3 Answers3

5
// Returns the alphabetic name of current registered operator

public String getServiceProvider() {

      TelephonyManager manager = (TelephonyManager)
      getSystemService(Context.TELEPHONY_SERVICE);

      String carrierName = manager.getNetworkOperatorName(); // alphabetic name of current registered operator

      return carrierName;
}

Example Output: Vodafone

2

please check with the following code

 TelephonyManager telephonyManager = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
        String deviceID =telephonyManager.getDeviceId();
        String deviceID1 =telephonyManager.getSimSerialNumber();
        String deviceID2 =telephonyManager.getSimOperatorName();

Get your CELL ID : http://android-coding.blogspot.in/2011/06/get-location-of-cell-id-from.html use this link..

from above link you will Get location of Cell ID, from opencellid.org using HttpGet().

Edit 2

Hi see below link in the same type of question have been discused there .

Get Cell Tower Locations - Android

Community
  • 1
  • 1
itsrajesh4uguys
  • 4,610
  • 3
  • 20
  • 31
1

Use This code, It will give you your service provider name :

TelephonyManager telephonyManager = ((TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE));
String operatorName = telephonyManager.getNetworkOperatorName();
Muhammed Refaat
  • 8,914
  • 14
  • 83
  • 118