[RELEASED] Eazy NetChecker - Reliable Internet Detection

Asset Store Page | Website | Documentation

Easy and reliable internet detection

Do you want to truly know your game can reach the internet? Eazy NetChecker is the right tool! Eazy NetChecker is a light but reliable and powerful tool for really determining the status of the internet connection on all devices and platforms.

Methods like Unity’s Application.internetReachability cannot truly tell if a device is actually connected to the internet, and neither was designed to do so. Moreover, simple methods like pinging google are unreliable since devices could appear to be connected to the internet, but in reality be behind a restricted network. Eazy NetChecker is the solution to all that! By utilizing a technique called Captive Portal Detection, it can quickly and reliably determine the current internet connection. Caprive Portal Detection is a technique that is used in all major operating systems for detecting internet connectivity.

Reliable internet detection
Check whether your game can truly reach the internet or your server. By utilizing a technique called Captive Portal Detection, it can quickly and reliably determine the current internet connection, unlike unreliable methods often used by developers. Captive Portal Detection is a technique that is used in all major operating systems for detecting internet connectivity.

Prespecified industry standard check methods
Eazy NetChecker comes with a few ready to use check methods, which are used by Google, Microsoft and Apple for their own internet detection algorithms. Moreover, you can set Eazy NetChecker to always automatically select the most appropriate check method depending on the platform your game is running on.

Custom check methods
Eazy NetChecker is fully flexible and extentable since it allows you to create your own custom check methods to specifically fit your needs.

Events
Various events are raised during the lifetime of an internet check, which allow you to easily implement various different logics based on your requirements.

Easy to use editor
A fully custom editor is included which gives you the option to set everything up in Unity editor, limiting the coding required during runtime.

Super easy integration
Integrating Eazy NetChecker into an existing project is extremely easy. Just add a few lines of code for internet detection and that’s it!

Runtime API
Handle all tasks from code using a simple but in-depth API, which can give you full control over internet detection.

Fully documented
Full online and offline documentation, including an API reference and an in-depth manual.

EXAMPLES
Just a few simple examples of different ways you can use Eazy NetChecker

Example 1:

private void Awake()
{
    EazyNetChecker.UseGoogle204Method();
    EazyNetChecker.OnConnectionStatusChanged += OnNetStatusChanged;
    EazyNetChecker.StartConnectionCheck();
}
private void OnNetStatusChanged()
{
    Debug.Log("Internet Connection Status changed to: " + EazyNetChecker.Status);
}

Example 2:

private void Awake()
{
    EazyNetChecker.UseGoogle204Method();
    EazyNetChecker.StartConnectionCheck();
}
private void Update()
{
    if(EazyNetChecker.Status == NetStatus.Connected)
    {
        Debug.Log("Yeyyyy, I have internet!");
    }
    else
    {
        Debug.Log("No internet :(");
    }
}

Read the Documentation for more examples and more in-depth explanation

FEATURES LIST
• Reliable detection of internet connection status (Pending, NoConnection, WalledGarden, Connected)
• Pre-specified captive portal detection check methods (Google204, MicrosoftNCSI, AppleHotspot)
• Custom check methods
• Automatically select the best check method for each build platform
• Control over when checks are performed
• On Start: Run a check when your game is loaded
• Continuously: Automatically run checks on configurable intervals
• Manual: Run a single check whenever you need it.
• Stats and info about internet status and connectivity
• Helpful events to listen to (OnStart, OnFinish, OnStatusChanged, OnTimeout)
• Runtime API (Fully documented)
• Easy to use Editor
• Super easy integration
• Full C# source code

COMPATIBILITY
• Multi-platform support (Windows, Mac, Linux, Android, iOS)
• Unity 5.6 or higher

DEMOS
Windows Demo
Android Demo

DOCUMENTATION
Manual
API Reference

SUPPORT
If you need help, have a question or want to request future features, please feel free to contact us and we will get back to you as soon as possible. You can send us an email at support@hellmadegames.com, contact us on Facebook, or post on this thread.

Get it on Asset Store

1 Like

Hi,

Could you please tell me does this asset work with Android 9.0 Pie? It expects apps to use HTTPS by default and HTTP is permitted only as a configured exception.

Hello Nadan,

It does work on Android 9, but as you have already mentioned it will not allow HTTP without you configuring the Android manifest. See here how to do that: https://developer.android.com/training/articles/security-config

Of course, custom check methods using HTTPS do still work fine without any configurations.
We will modify the standard check methods with HTTPS links (if their providers have one) so they will work with Android 9 without changes to the manifest as well.

Best,
Jack

Version 1.1.0 is now live!

Added

  • Warning messages on editor (Invalid link & unsafe cleartext HTTP link)
  • Connection statistics (Editor & API)

Changed

  • Standard check methods (Secure version of google204, Miscrosoft NCSI to Microsoft Connect Test, Secure version of apple hotspot)
  • NetCheckMethod implementation from WWW to UnityWebRequest

Fixed

  • Non-stop debug message after time out

Hi @JackMini36
Does your asset determines, when user switches from WiFi to Carrier Network internet on mobile phone?
I would guess, that there is a time, when the device has no access to the internet, so it could be detected by that, but the timeframe without internet is not set. I do not want do do the test every Update to check it out. Is there a reliable way, hot to figure it out?

Do i have to use Unity - Scripting API: Application.internetReachability to check it? Is it compatible with your solution?

We need to have a complex connection information because we are using 3rd party server side component, which is… very poorly designed to handle changes between network carrier and wifi internet connection.

Hello Jochanan,

You can check whether it is Wifi or carrier network by using the EazyNetChecker.ReachabilityType Property:
http://www.hellmadegames.com/projects/eazy-netchecker/docs/api-reference/html/P_Hellmade_Net_EazyNetChecker_ReachabilityType.htm

However, currently there is no event that will be triggered when the value of this property changes. You need to check yourself whenever you need to. Although such event could be added easily.

If you want to check if there is an internet connection in general (or if it down at the moment), you can do it by starting a continuous internet check, instead of a single one:
http://www.hellmadegames.com/projects/eazy-netchecker/docs/api-reference/html/M_Hellmade_Net_EazyNetChecker_StartConnectionCheck_1.htm

By using the above you can set your own interval for the checks. Whenever the internet connection status changes, an event will be raised. You just have to listen to this event:
http://www.hellmadegames.com/projects/eazy-netchecker/docs/api-reference/html/E_Hellmade_Net_EazyNetChecker_OnConnectionStatusChanged.htm

Check out the “Continuous check” section in the manual for further explanation and an example:
http://www.hellmadegames.com/projects/eazy-netchecker/docs/manual/Manual.pdf

Please let me know if that covers your question or if you need more info.

1 Like

Hello @JackMini36

Amazing plugin. I have a question.

What exactly does timeout do. I am unable to understand from your documentation && comments in the script.

http://www.hellmadegames.com/projects/eazy-netchecker/docs/api-reference/html/P_Hellmade_Net_EazyNetChecker_Timeout.htm

Hope for a layman explanation. Thank you.

Hello Karsnen_2

I am glad you like Eazy NetChecker :slight_smile:

Timeout is basically how long an internet check will keep trying to determine the internet connection status. If that time is passed and the check was not able to do that yet, it will just timeout. That means it will stop and decide that there is no internet connection.

Timeout can usually happen when your actual connection is bad or unstable.

Hope that helps. Please let me know if you need more info.

Target Platform: iOS 12.0 +
Unity Version : 2018.4.10F1

Scenario

I initiate your plugin at the very start of the application. Then for the entirety of the application whenever I need to know if there is internet available, I use your plugin. Your plugins runs with “Eazy NetChecker” gameobject being persistent. I know the status of the net by listening to this event

EazyNetChecker.OnConnectionStatusChanged += OnNetStatusChanged;

When the net status is NetStatus.Connected:
then I consider that there is internet connection. Else no internet availability.
Implementation

The way I implement the above is as below

private void Start()
{
    EazyNetChecker.UseGoogle204Method();
    EazyNetChecker.StartConnectionCheck();
}

private void OnEnable()
{
    EazyNetChecker.OnConnectionStatusChanged += OnNetStatusChanged;
}

private void OnDisable()
{
    EazyNetChecker.OnConnectionStatusChanged -= OnNetStatusChanged;
}

Question

Let’s say there is a timeout, what will be the value of [http://www.hellmadegames.com/projects/eazy-netchecker/docs/api-reference/html/P_Hellmade_Net_EazyNetChecker_Status.htm]
There are two scenario’s to the above question

  • It gets a timeout due to no internet connection, in which case it would be [NetStatus.NoDNSConnection]
  • When timeout happens, my understanding is that Hellmade.Net.EazyNetChecker.CheckConnectionCoroutine() co-routine is stopped. Subsequently, when internet connectivity resumes for the device → how does the system respond to that

Please advice.
Thank you for your time.

Hello Karsnen_2

The Status will always be NetStatus.NoDNSConnection after a timeout. And you are right, Hellmade.Net.EazyNetChecker.CheckConnectionCoroutine() will be stopped after a timeout. That means the check will be interrupted. You can restart it to retry to get the connection status. You can easily do that by listening to OnCheckTimeout, and start a connection check there again.

Please let me know if you need more info, or some code examples.

1 Like

Is it possible to do the periodical check only when offline? I don´t need to continuously check when connected, I need to check only after some failed query - ie., after a qyery fails, I need to know when the connection is back again. Is it possible to do this?

Hello pgualandi

Yes you can do that. Just listen to the OnConnectionStatusChanged event, and check the status there. If offline, start a new continuous check. If not, stop it. Make sure to first start a continuous check.

Something like:

...

// Start listening
EazyNetChecker.OnConnectionStatusChanged += OnNetConnectionStatusChanged;

...

// Stop listening when you don't need it
EazyNetChecker.OnConnectionStatusChanged -= OnNetConnectionStatusChanged;
...

private void OnNetConnectionStatusChanged()
{
    if(EazyNetChecker.Status == NetStatus.Connected)
    {
        // stop the continuous check
    }
    else
    {
        // start the continuous check
    }
}

Check the docs for more info on how to use the events.

"Thank you for this plugin, it seems to have given me hope. I would like to purchase this plugin, but I am unsure if it can help with my particular issue. Simply put, I have several VR devices which do not have SIM cards and do not have direct USB connectivity to access the internet. Their only means of connecting to the internet is through routers in the area, which are sometimes unstable and can lose their ability to connect to the internet. Even when they emit WIFI signals, they cannot access the internet, It can be understood as connecting to a hotspot from a phone without a SIM card…
I would like to know if this plugin can help me with the following:

  • Can I always detect the current network status, such as whether it can access the internet, cannot access the internet, whether WIFI is enabled or disabled, etc.?
  • Can I customize some website URLs and check their status using the plugin to know the current network status?

Thank you very much."

Hello, is this plugin alive? Still Works with Unity6?
As a customer, I sent you an email last week, and got not answer.

Hello tolosaoldfan,

I apologize for not getting back to you. I somehow missed your email.
Yes, the plugin is still alive. I just replied to your email. I hope that will solve your issue :slight_smile:

1 Like

Got it, it has solve my issue. Change Allow downloads over HTTP to Always allowed in the Player Settings (Under Other Settings).

1 Like