6

I want to read APN settings on Android 4.2 and above. when of best answer i found on the link stackoverflow reference link

it works most of android phone having os 4.2 and above.but does not work most of the samsung devices. Any other way to decide default APN settings?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62

1 Answers1

0

This seems to work, haven't exhaustively tested yet:

TelephonyManager tel = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
answer = tel.getNetworkOperatorName(); //numeric: tel.getNetworkOperator();

May also check for

tel.getSimOperatorName();
Community
  • 1
  • 1
nicolallias
  • 1,055
  • 2
  • 22
  • 51