My current game deals with all cases when an internet connection is available but does not deal with the case when there is no internet connection, resulting in nasty errors of course which should be dealt with before they occur by testing if the Network operations can be performed in the first place.
When trying to run the test the connection with the example from the reference guide, if no internet connection is present, this error occurs:
"Cannot resolve connection tester address, you must be connected to the internet before performing this or set the address to something accessible to you."
To completely cover all the cases, I need to allways know if there is an internet connection. Polling the network connection with the function Network.TestConnection() does not work at all and does not address my issue since it refers mainly to NAT punchthrough statuses.
(Adding a comment to an old posting in case somebody finds this using search…)
To truly know you’re online, you need to implement “captive portal detection”, to know if you’re e.g. hitting a public WiFi login page. So just checking Application.internetReachability or doing a Ping to some address doesn’t guarantee you can successfully make connections or make WWW requests.
I have made an easy asset called Internet Reachability Verifier. It keeps you up-to-date whether you have verified internet access (WWW requests can be done). Works with Desktop, Mobile and Webplayer platforms (need to self-host a file in originating server for Webplayer).
I have released a event based plugin for ios that lets you do exactly this without having to do it manually. It is very easy to use and works on all ios devices. Android version is on works as well