Hi,
I’m pretty sure the engineers can only access what’s available via the devices SDK. If anything, the issue is Android not supporting this fairly obvious piece of functionality. Perhaps engineering will chime in with more on why Corona or Android does not handle this event.
Pinging servers or data sources to check for availability is a pretty standard practice. If you’re looking for an “instant” check, I would try the socket library.
[lua]
– Check connectivity with socket
local function isOnline()
local sock = require( ‘socket’ )
local client, err = sock.connect(‘google.com’, 80)
if not client then
return nil, err
else
client:close()
return true, nil
end
end
[/lua]
And then of course using it…
[lua]
– Check connectivity (later)
local online, err = isOnline()
if not online then
print( "Uh Oh: " … err )
else
print( “I’m Online!” )
end
[/lua]
It’s not perfect, but it works. The main thing is pinging a solid endpoint (like Google), because you’re looking for connectivity, not whether the endpoint is available.
Hope that helps.
Cheers.