Hi,
I would like to check network status before I send any query to server, but after I studied and tested SDK, I found only two possible way can be used,
First method is using socket.connect() as following:
local client = socket.connect(“www.google.com”, 80)
connection status can be confirmed by checking if (client ~= nil) then …
Second method is using network.request() as following:
network.request( “http://www.google.com”, “GET”, networkListener )
connection status can be confirmed from networkListener by checking event.isError
First method is fast but system will hang a while to wait timeout (all the button is locked) if 3G signal is unstable. The second method is slower than First method but more accuracy.
Is there any better and faster way to detect network status ?
By the way, what I mean for “3G signal is unstable” is mobile phone had 3G indicator shown but with very low signal strength.
Thanks