Search code examples
androidgsmphone-state-listenersignal-strength

Android - How to find if device is receiving GSM signals or not?


I simply want to check if my device is receiving GSM signals or not. I know about SignalStrength class and its getGsmSignalStrength(). I have worked with PhoneStateListener and onSignalStrengthsChanged().

But even where I am not receiving any signals, I still get greater than 0 GSM signals strength, as shown in the screenshot:

enter image description here

See the signals level, its not even low, its red crossed. And the getGsmSignalStrength() returned me 16. (Current is a different number, please ignore it.)


Solution

  • If you are only interested in the GSM signal from your operator then use getMnc() from CellIdentityGsm to establish if the signal you are measuring is valid.

    If you want the GSM signal only when the device is in service (ie successfully connected to a network) then use the ServiceState checker to establish what state the device is in.

    As per above comments, the symptoms indicate that you are measuring other operators' GSM signals.