Search Unity

Online Check PRO - Verify Internet reachability

Discussion in 'Assets and Asset Store' started by Stefan-Laubenberger, May 24, 2017.

  1. reddo1987

    reddo1987

    Joined:
    Aug 1, 2014
    Posts:
    35
    Hi,
    I have found the solution: .NET 4.x
    Previously it was .NET 2.0 and all the code in the HttpUtility was grey but not with .NET 4.x/IL2CPP:

    upload_2020-8-6_15-1-55.png

    It works also with the other projects (using the new Unity 2020.1.1 release).

    Thank you
     
    Stefan-Laubenberger likes this.
  2. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    We've just released version 2020.4.6 of Online Check.
    Main changes:
    • Planned final release for 2020
    • New Youtube video added:
    • Updated to Common 2020.4.7
     
  3. adre

    adre

    Joined:
    Mar 28, 2014
    Posts:
    38
    Hi, just bought the asset, but have some doubt about the features...
    is it possible to speedtest on mobile (Android/iOS)?
    Also, on webgl?
     
  4. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Hi

    Speed test works on mobile - see the Android-demo for more:
    https://drive.google.com/file/d/1JiY96hHyvyNF4COwZu5erIhuAlGWsJtH/view?usp=sharing

    WebGL does also work but you have to setup your own server inkl. test-files with CORS enabled.


    Cheers
    Stefan
     
  5. indie6

    indie6

    Joined:
    Dec 15, 2012
    Posts:
    101
    Hi, Stefan

    Does the plugin work fine when a VPN is on?

    Also, if a device is connected to a wifi, but the router does not have access to the internet, does the plugin return "No Internet connection" ?
     
  6. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Hi

    Thank you for your interest in OC!

    1. VPN should work just fine
    2. Yes, it will return "no connection"

    Cheers
    Stefan
     
  7. Hebin_IVS

    Hebin_IVS

    Joined:
    Nov 25, 2020
    Posts:
    3
    Hi Stefan,

    I have a question to ask. Suppose I have couple of android web-views present in my application is it possible to check the network statistics of each web-view like data usage etc.?

    Hope my question is clear. Any leads would be appreciated.
     
  8. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Hi

    OC doesn't monitor the data usage of web-requests/views.
    However, imho it's quite easy to do it on your own. Simply create a static class (e.g. "Context") with a public long variable (e.g. "TotalBytesDownloaded") and add the downloaded bytes from all web-related operations.

    I hope this helps you further.


    Cheers
    Stefan
     
    Hebin_IVS likes this.
  9. pgvix

    pgvix

    Joined:
    Jun 9, 2021
    Posts:
    3
    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?
     
  10. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Sure, you could do it like in this script:
    Code (CSharp):
    1. using UnityEngine;
    2. using Crosstales.OnlineCheck;
    3.  
    4. public class OCController : MonoBehaviour
    5. {
    6.    private void Start()
    7.    {
    8.       OnlineCheck.Instance.EndlessMode = false;
    9.       OnlineCheck.Instance.OnOnlineStatusChange += onOnlineStatusChange;
    10.  
    11.       //simulate a failed query after 5sec
    12.       Invoke(nameof(QueryFailed), 5);
    13.    }
    14.  
    15.    private void OnDestroy()
    16.    {
    17.       if (OnlineCheck.Instance != null)
    18.          OnlineCheck.Instance.OnOnlineStatusChange -= onOnlineStatusChange;
    19.    }
    20.  
    21.    public void QueryFailed()
    22.    {
    23.       Debug.Log($"Query failed.");
    24.       OnlineCheck.Instance.Refresh(true);
    25.    }
    26.  
    27.    private void onOnlineStatusChange(bool isconnected)
    28.    {
    29.       Debug.Log($"Internet available: {isconnected}");
    30.  
    31.       OnlineCheck.Instance.EndlessMode = !isconnected;
    32.  
    33.       //retry the query
    34.       if (isconnected)
    35.          Debug.Log("Retry the query");
    36.    }
    37. }
    Register the callback "OnOnlineStatusChange" and react accordingly.
    If you like an update of OC for the commented line, please send me your invoice via email.

    I hope this helps you further.

    Have a nice holiday!


    Cheers
    Stefan
     
    Last edited: Dec 30, 2021
  11. summitgamesentertainment

    summitgamesentertainment

    Joined:
    Sep 30, 2016
    Posts:
    17
    Hi Stefan!
    Thanks for making such a great asset OC. I just purchased it and would like to confirm is there a way we can test jitter results? Or any scrits that we can code ourself and get those results? Like ping test or may be SpeedTest scenes?
     
  12. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Hi

    Thank you for your kind words!

    Unfortunately, I don't understand your request - what would you like to achieve?


    So long,
    Stefan
     
  13. summitgamesentertainment

    summitgamesentertainment

    Joined:
    Sep 30, 2016
    Posts:
    17
  14. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    We're currently working on an update that returns the latest RTT from the last sucessful check.
    Would that help?
     
  15. summitgamesentertainment

    summitgamesentertainment

    Joined:
    Sep 30, 2016
    Posts:
    17
  16. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    We plan to include the RTT for requests in the next update, which is hopefully released this month.


    Edit:
    @summitgamesentertainment We added the RTT feature to our latest beta. If you like to have access to it, please send us your invoice via email.
     
    Last edited: Feb 15, 2022
  17. summitgamesentertainment

    summitgamesentertainment

    Joined:
    Sep 30, 2016
    Posts:
    17
    Hi Stefan!

    I have another query. Just like we have a download speed test (scene) in the package. which downloads a small, medium, or large file and gives speed test results of download speed. Is it possible we can do similar for testing an upload speed as well? I am looking to test upload speed results from a file (maybe) or a network every second.

    Thank you for your quick revert and such quality support. I have sent an email with the details, so you can send over the updated package.
     
  18. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Hi

    You could use our SpeedTestNET-package inside our asset - it also measures the upload-speed.


    Cheers
    Stefan
     
  19. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,945
    Hi @Stefan-Laubenberger,
    Does your plugin provide access to Wifi SSID? If not can you please add support for it for iOs n Android?
    Thanks
     
  20. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Hi

    Unfortunately, this isn't something we intend to implement. On mobile, the user normally sets the current wifi manually via the settings from the OS.


    Cheers
    Stefan
     
  21. justtime

    justtime

    Joined:
    Oct 6, 2013
    Posts:
    424
    @Stefan-Laubenberger
    Hi there!
    Tell me please how can i get 2 statuses at the same time: default and custom check? So i need network status and server availability. I don't want to switch on and off UseOnlyCustom value.
     
    Last edited: Oct 30, 2022
  22. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Hi

    This is currently only possible the way you implemented it since the purpose of OnlineCheck is to determine the Internet connectivity, not server availability.
    However, I see your point and we will consider adding a solution for your desired functionality in an upcoming release.


    Cheers
    Stefan
     
    justtime likes this.
  23. justtime

    justtime

    Joined:
    Oct 6, 2013
    Posts:
    424
    Thanks a lot. I think it's not a big deal to ping some server, but will make your really great asset more functional.
     
  24. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Since you mentioned it: have you tried our "PingCheck" in the Extras-folder? It may is the solution for you - if the LastPingTime is greater than 0, your server is up.
    upload_2022-10-31_18-16-30.png
     
  25. Colin_MacLeod

    Colin_MacLeod

    Joined:
    Feb 11, 2014
    Posts:
    334
    @Stefan-Laubenberger Is the latest version of OC (Version 2024.1.0) compatible with TBP and TSP Version 2024.1.1? I seem to get various issues with common libraries
     
  26. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Hi Colin

    We will release updates for all assets within the next 48h.
    Meanwhile, please make sure you import TBP or TSP as last of our packages.


    Regards,
    Stefan
     
    Colin_MacLeod likes this.
  27. Colin_MacLeod

    Colin_MacLeod

    Joined:
    Feb 11, 2014
    Posts:
    334
  28. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    We've just released version 2024.1.1 of Online Check.
    Main changes:
    • Support for Unity Cloud Build improved
    • Updated to Common 2024.1.1
     
  29. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Hi Colin

    I apologize for the delay.
    The new version of Online Check is available for download.

    Regards,
    Stefan
     
    Colin_MacLeod likes this.
  30. Colin_MacLeod

    Colin_MacLeod

    Joined:
    Feb 11, 2014
    Posts:
    334
    Great - thank you!