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. QNetworkConfigurationManager in Android
Forum Updated to NodeBB v4.3 + New Features

QNetworkConfigurationManager in Android

Scheduled Pinned Locked Moved Mobile and Embedded
7 Posts 2 Posters 2.5k 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.
  • L Offline
    L Offline
    leathergirl
    wrote on last edited by
    #1

    Hello,

    I'm developing a Qt application in my Android phone and I'm using QNetworkConfigurationManager to find the existing configuration (like scan for available wifi networks). When I run the application on Desktop it works fine (it returns all the available configurations, wlan0 and eth0), however when I deploy it on my Android phone it seems that it cannot find the available configurations except "wlan0".
    More specifically this line of code:
    @QNetworkConfigurationManager manager;
    const bool canStartIAP = (manager.capabilities()
    & QNetworkConfigurationManager::CanStartAndStopInterfaces);@

    gets the value "true" on Desktop and "false" on Android.

    Am I missing something? Should I add anything to the .pro file except for QT+=network ?

    Thanks!

    1 Reply Last reply
    0
    • p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #2

      Hi,

      bq. when I deploy it on my Android phone it seems that it cannot find the available configurations except “wlan0”.

      Does your Android phone have other interfaces like for eg. eth0 i.e a LAN port ?

      157

      1 Reply Last reply
      0
      • L Offline
        L Offline
        leathergirl
        wrote on last edited by
        #3

        No, I do not think that it has. It is connected to WiFi when I deploy the application and that's why I thought it only finds wlan0.

        1 Reply Last reply
        0
        • p3c0P Offline
          p3c0P Offline
          p3c0
          Moderators
          wrote on last edited by
          #4

          If it has WiFi then it will be wlan0. Now does your application detect wlan0 ?

          157

          1 Reply Last reply
          0
          • L Offline
            L Offline
            leathergirl
            wrote on last edited by
            #5

            The thing is it always detects wlan0.
            I want it to detect all available networks in the area and it doesn't...

            1 Reply Last reply
            0
            • p3c0P Offline
              p3c0P Offline
              p3c0
              Moderators
              wrote on last edited by
              #6

              Well you are asking for the available networks and not interfaces. I'm not sure if it works. If it doesn't another way would be to use QAndroidExtras to execute the Android specific Java API's for WiFi network scanning. For eg. "this":http://www.androidsnippets.com/scan-for-wireless-networks

              157

              1 Reply Last reply
              0
              • L Offline
                L Offline
                leathergirl
                wrote on last edited by
                #7

                Yes I have it in mind.
                I was planning to use QNetworkConfigurationManager to see available networks, put them in a ListWidget, and use QAndroidExtras to connect to a specific network, the one the user chooses from the list.

                Anyway, thank you very much for your reply!
                I will search more to see if I will find a solution!

                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