• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps allright what's the deal with getting the signalstrength ?

Hi,

I am unable to get the current network signal strength it does give me a value but that value is not correct (asu 99) .

Code:
TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
int event = PhoneStateListener.LISTEN_SIGNAL_STRENGTHS;
tm.listen(listenername,event);

@Override
        public void onSignalStrengthsChanged(SignalStrength signalStrength) {
            super.onSignalStrengthsChanged(signalStrength);
            signalStrength.getGsmSgnalStrength();  // asu number
            int dbm = -113 + (2 * signalStrength.getGsmSignalStrength()); // conversion to dbm
}

but it doesn't work i'm wondering why .....
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones