Reputation: 495
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?
Upvotes: 4
Views: 5938
Reputation:
// 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
Upvotes: 5
Reputation:
Use This code, It will give you your service provider name :
TelephonyManager telephonyManager = ((TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE));
String operatorName = telephonyManager.getNetworkOperatorName();
Upvotes: 1
Reputation: 4638
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
Upvotes: 2