Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 3 Support (Qt 5) › Problem with the isOnline property

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #18993

    Alex

    When I run my program on my computer, the App::isOnline property is always True even if i do not have internet connection. And when i use it on my Android phone it becomes True when the phone is connected to a Wifi, even if this wifi does not have internet connection. Please help me ! I have to solve this problem asap.

    #18996

    Alex
    Felgo Team

    Hi Alex,

    the isOnline property indicates that the device is either connected to cellular data network or to a wireless network, and thus able to connect to the internet. We are using the native device signals for this. To check if this network connection actually transfers data to/from the internet, you’d need to add your own check on top. What type of app are you developing?

    Cheers,
    Alex

    #19004

    Alex

    Thank you ! I am developpingvan app that has to be accessed from anywhere by the users and i need to notidy them about the imoact of the changes they do (if it will be saved locally because there is no i’ternet co”ection cr if it will be saved directly online)

    But how to know if the app transfers data or not from or to internet ?

    #19039

    Günther
    Felgo Team

    Hi,

    one possible solution is to actively send a web request to a page you assume is always reachable if there’s a valid internet connection. For example to try reaching “www.google.com” (or your custom web service you are going to use in your requests). If you retrieve a result successfully, you can assume you are connected to the internet. If you reach a time-out or an error during the test-request, you probably don’t have a stable connection.

    Best,
    Günther

Viewing 4 posts - 1 through 4 (of 4 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded