I am building an android app that should send sms. When sending SMS I want to check if signal strength is enough to send sms. When not then the app should build a listener that listens for signal strength and send sms as soon as signal is enough.
I think that I only need to check if there is any signal because I believe that only a very low signal is enough to send SMS. Should I use android.telephony.SignalStrength getGsmSignalStrength()
at begining to check what is the signal strength. If returned value is 0 then I should create a listener LISTEN_SIGNAL_STRENGTHS
? Or is there any better way?
Thanks in forward
Use this:
To get signal strength (in dBm and asu) for all networks (LTE, GSM, CDMA and WCDMA). And then create an if() to limit signal level. Ex.: