Application.internetReachability isn't enough for you?
Internet Reachability Verifier is for making sure that the internet can be truly reached.
This is done with a technique called "captive portal detection", which is used by operating systems e.g. to determine if they should present a network login screen.
Several methods for the captive portal detection are available, modeled after the way how large platform-holder companies implement it (such as Google, Microsoft, Apple and Ubuntu). You also have an option to use a custom way based on your own web hosting.
What features does Internet Reachability Verifier have?
Accompanying pdf manual contains more details of each feature listed below.
- Automatically monitors and verifies internet reachability, implemented using a light-weight coroutine.
- If internet connectivity stops working middle of your own networking and you get error codes from some networking library, you can ask for reverification of the internet reachability (this asset will not actively monitor loss of effective networking, as that would use up user's mobile data quota unnecessarily).
- 8 different captive portal detection methods: Google204, GoogleBlank, MicrosoftNCSI, Apple, Apple2, AppleHTTPS (new for ATS), Ubuntu, Custom.
- Default setting is to automatically pick a suitable ("native") captive portal detection method by platform.
- Optional delegate for matching returned data for using custom method.
- Optionally append cache buster to url when using the custom method.
- Detailed internet access status property (Offline, PendingVerification, Error, Mismatch, NetVerified).
- Easy callback for listening to changes in the internet access status property (optional).
About the implementation:
- Works with Desktop and Mobile platforms (self-hosted Custom method can be used with legacy Webplayer).
- No native code.
- C# source code included.
- Small footprint.
- Supports Unity 5, Unity 4 and Unity 3.5.7 (no Pro needed for older versions)
Unity Forum Thread