Is there a way to check if a device is actually connected to a network? Dealing with Cafes, hotels, etc?

2 posts, 0 answers
  1. Carlos
    Carlos avatar
    69 posts
    Member since:
    Jun 2011

    Posted 18 Nov 2015 Link to this post

    We are using Telerik Platform and Kendo UI Mobile for a hybrid project.

    We ran into an issue where if the device/app sees a WiFi network, BUT the WiFi network requires authentication or a acceptance of their terms and conditions (most commonly seen for cafes, hotels, etc.) the app thinks it is online, but since it is really not, no external data can be pushed to the app.

    Using the network check (assumed from Cordova) just sees a WiFi network, so a check for network is actually unreliable.  
    The app is seeing a network, but the user is just not logged on to get remote data from the app.  Meaning that the app 'thinks' it is actually on a network, when it is really not.   They can't actually get external data through the app if the app is not actually connected to the internet.

    We are trying to figure out a way to inform the user that they need to actually be logged into the network, or that we see a network but they are not actually online.

    Has anyone dealt with this or handled these types of situations?
    How did you approach or work through a solution. Any code snippets?

  2. Tsvetina
    Tsvetina avatar
    1861 posts

    Posted 20 Nov 2015 Link to this post

    Hi Carlos,

    You can consider making a test request to a remote point that would be always available at the places your app is used, for example the server from which you are going to get the external data. If the ping fails, you can tell the user that they are either offline or there is no access to the server at this moment.


    Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

Back to Top