Answer the question
In order to leave comments, you need to log in
How to determine signal strength in dBm in Android (Java) application?
What you need: by pressing the button , determine the signal strength of the mobile network at the moment in dBm (in extreme cases - just excellent / good / bad).
There seem to be a lot of examples on the Internet, but all of them are somehow cumbersome and incomprehensible, I can’t attach them to my program. Plus, it is not clear why several classes seem to be suitable for this at once, namely:
android.telephony.SignalStrength
android.telephony.CellSignalStrengthCdma (Gsm/Lte)
android.telephony.TelephonyManager
Answer the question
In order to leave comments, you need to log in
and what is the solution from the first pages of Google, like this, not suitable for?
TelephonyManager telephonyManager = (TelephonyManager)this.getSystemService(Context.TELEPHONY_SERVICE);
// for example value of first element
CellInfoGsm cellInfoGsm = (CellInfoGsm)telephonyManager.getAllCellInfo().get(0);
CellSignalStrengthGsm cellSignalStrengthGsm = cellInfoGsm.getCellSignalStrength();
cellSignalStrengthGsm.getDbm();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question