Best method for detecting an internet connection

Tom, thanks for the code and the clarification. That code you posted now allows my Kindle Fire version to work.
 
I’d say the docs need to be more clear about it not working on Android. Yes, I know, it *does* work on Android but always returns false. That’s not “working” by any real definition. Neither canDetectNetworkStatusChanges nor setStatusListener() say anything about being useless for Android.

 Jay

Jay, I agree with you. I looked at the API and saw that it really doesn’t say that Reachability is a iOS-only feature. It’s on my list for an update.

Thanks,

Tom

I am using this:

function isNetworkOn() local status = network.getConnectionStatus() return status.isConnected end

Is there some minus in using this?

It works perfect as far as I can tell.

Still the same. I didn’t see this thread sadly and was trusting the API doc… Wasted quite a few hours. Oh well. Live and learn.

Still the same. I didn’t see this thread sadly and was trusting the API doc… Wasted quite a few hours. Oh well. Live and learn.