Internet Reachability Verifier for Unity®

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.
  • No native code.
  • C# source code included.
  • Small footprint.
  • Supports Unity 2018, 2017, 5, 4 and 3.5.7 (no Plus or Pro needed)

Unity Forum Thread



// 2018-03-06, 1.1.3 - Fixed deprecation warning with latest Unity versions. Made responseHeaders related code bit more robust.
// 2017-04-12, 1.1.2 - Hotfix for Apple methods.
// 2017-04-06, 1.1.1 - Added tooltips and custom editor which can give some in-editor warnings of unsuitable configuration.
// 2016-08-27, 1.1.0 - Changed internal coroutine to wait using realtime instead of pauseable normal time. Also the getTimeWithoutInternetConnection is now realtime-based. Added forceReverification method which sets status to pending verification, which is also now internally noticed immediately. Exposed the time value settings to inspector. Added AppleHTTPS method (due to ATS) and waitForNetVerifiedStatus convenience helper coroutine. Fixed regression bug of running verification twice.
// 2015-05-21, 1.0.4 - Fixed Unity 5 Asset Store warning.
// 2015-03-26, 1.0.3 - Support for Unity 5. Made DontDestroyOnLoad optional. Also start/stop netActivity in OnEnable/OnDisable.
// 2014-09-15, 1.0.2 - Refined customMethodExpectedData check to support expected empty result. Added option to append use a "cache buster" query string when using custom method. Added getTimeWithoutInternetConnection().
// 2014-07-22, 1.0.1 - Added Apple2 method (now default for Apple platforms). Added explanation to documentation why custom method is recommended.
// 2014-06-18, 1.0.0 - Initial version.

Below:   Images from default and custom method examples


Did you like how this Internet Reachability Verifier package is built?

Also from Strobotnik for Unity®:
Klattersynth TTS (NEW!)
Google Universal Analytics for Unity®
Pixel-Perfect Dynamic Text

Strobotnik is a member of the Unity Affiliate Program.