Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How to detect (and get notified) when the phone (N950) stops using WiFi for internet access.
Forum Updated to NodeBB v4.3 + New Features

How to detect (and get notified) when the phone (N950) stops using WiFi for internet access.

Scheduled Pinned Locked Moved Mobile and Embedded
2 Posts 1 Posters 1.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    deion
    wrote on last edited by
    #1

    Hi all,

    In my app I'm using QTcpSocket to download files from the internet.
    I want to allow the user the option to download files only while connected on WiFi (so that he won't have to pay thousands of E/$/etc for using the operator data). I thought of using the class QSystemNetworkInfo in Qt Mobillity with the following signals:
    @void QSystemNetworkInfo::networkModeChanged ( QSystemNetworkInfo::NetworkMode mode ) [signal]@

    However this signal never gets called ...

    1 Reply Last reply
    0
    • D Offline
      D Offline
      deion
      wrote on last edited by
      #2

      The signal that is triggered when I connect/disconect to/from the WiFi router from the phone is:
      @void QSystemNetworkInfo ::networkStatusChanged(QSystemNetworkInfo::NetworkMode mode, QSystemNetworkInfo::NetworkStatus status);@

      When connecting to WiFi the mode param is QSystemNetworkInfo::NetworkMode::WlanMode and the status param is QSystemNetworkInfo::NetworkStatus::Connected

      When disconnecting from WiFi the mode param is QSystemNetworkInfo::NetworkMode::WlanMode and the status param is QSystemNetworkInfo::NetworkStatus::NoNetworkAvailable.

      There is one more test I need to do later (and post here the results): I will unplug the UTP cable from my WiFi router (so that the phone WiFi will still be connected to the WiFi router but the WiFi router will actually provide no internet connection) and see if the signal gets called with the correct params.

      One last thing I noticed with this signal: the signal does not get called at all when connecting/disconnecting the operator data connection, only works for WiFi ... (but this is enough for me).

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved