mobile development - How to detect Network operators programmatically on Android? -


is possible identify attached mobile network , network operators programmatically on android? if possible please provide code samples

thank you.

try this,

// system telephony service reference telephonymanager tmanager = (telephonymanager) getbasecontext()       .getsystemservice(context.telephony_service);  // carrier name (network operator name) string carriername = tmanager.getnetworkoperatorname();  // phone model , manufacturer name  string manufacturer = build.manufacturer;  string model = build.model; 

required permission:

<uses-permission android:name="android.permission.read_phone_state"/>  

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -