Android – how to determine the signal strength when the GSM returns’ 99 ‘?

We have an internal Android application, which is the migration of a pre-existing JME application. One problem is that when the signal strength is low and the application is trying to send data, the application is complaining that the application is running out of device battery (this is a common behavior in mobile devices, not our direct problem)

The data needs to be sent in time, but cannot be sent immediately, so we check the signal strength before sending the data. This check uses phonestatelistener and onsignalstrengthschanged (signalstrength signalstrength) callback, which is recommended by many other similar so problems and articles

This runs on my own mobile phone (Telstra, Australia). Signalstrength. Getgsmsignalstrength() returns a value of 0-31 as expected. However, on a phone running on another network (Optus Australia), it reports GSM as true, but returns 99 (i.e. error code) when determining the signal strength. I believe this is still the correct behavior, because GSM is 2G data, 3G UMTS / HSPA should be checked. UMTS / HSPA is the network reported by elixir application on the mobile phone, as expected. We also have unconfirmed reports that Telstra Australia reports that the data of GSM application is not enough to send data from the application, But being able to browse the Internet and perform other data activities without problems makes me believe that it is wrong to check the GSM strength anyway

I'm running tests on other Android phones on the same network (still trying to access some devices), but it's definitely the case that we can browse the Internet and send (HTTP) data from our application. It just fails if we check the signal strength and always receive '99'. On Optus, signalstrength. Tostring() Always return 99 - 1 - 1 - 1 - 1 - 1 - 1 GSM 3 after several days of testing for multiple towers

The closest (unanswered) so thread is this one: getting signal strength RSCP and EC / Io from a phone served by a HSPA network

in summary:

>Telstra connection reports that GSM is true and returns the available signal strength > Optus connection reports that GSM is true but always reports' 99 '> in any case, GSM may be an error check. We need to try to obtain' actual data transmission network strength '

resolvent:

After testing with multiple phones from multiple suppliers and multiple (Australian) operators, this behavior seems to be specific to Samsung Galaxy S2 and did not appear in previous versions (Galaxy S)

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>