public class OperatorNameListener extends PhoneStateListener
public OperatorNameListener(EditText txt) {
public void onServiceStateChanged (ServiceState state)
switch (state.getState()) {
case ServiceState.STATE_IN_SERVICE:
case ServiceState.STATE_OUT_OF_SERVICE:
case ServiceState.STATE_EMERGENCY_ONLY:
String longOpName = "Long op name: " + state.getOperatorAlphaLong();
String shortOpName = "Short op name: " + state.getOperatorAlphaShort();
txt.setText(st + "\n" + longOpName + "\n" + shortOpName);