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. QT QBluetoothDeviceDiscoveryAgent require turn on GPS Module
QtWS25 Last Chance

QT QBluetoothDeviceDiscoveryAgent require turn on GPS Module

Scheduled Pinned Locked Moved Solved Mobile and Embedded
8 Posts 4 Posters 1.1k Views
  • 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.
  • R Offline
    R Offline
    RSmirnov
    wrote on last edited by
    #1

    I dont need use BLE in my app, but without GPS on my android classic bluetooth device scan does not work.
    How to be? Is this a bug or expected behavior?

    In log: * qt.bluetooth.android: Search not possible due to turned off Location service *

    I use:

    QT 5.15
    Android 8.0
    Android SDK 30

    sierdzioS J.HilkJ 2 Replies Last reply
    0
    • R Offline
      R Offline
      RSmirnov
      wrote on last edited by
      #8

      I found a solution to my problem. The topic can be closed.

      https://bugreports.qt.io/browse/QTBUG-80394

      1 Reply Last reply
      1
      • R RSmirnov

        I dont need use BLE in my app, but without GPS on my android classic bluetooth device scan does not work.
        How to be? Is this a bug or expected behavior?

        In log: * qt.bluetooth.android: Search not possible due to turned off Location service *

        I use:

        QT 5.15
        Android 8.0
        Android SDK 30

        sierdzioS Offline
        sierdzioS Offline
        sierdzio
        Moderators
        wrote on last edited by
        #2

        @RSmirnov said in QT QBluetoothDeviceDiscoveryAgent require turn on GPS Module:

        How to be? Is this a bug or expected behavior?

        This is expected behaviour. Android requires GPS for BLE discovery. This is true not only for Qt app, but for all Android apps.

        (Z(:^

        R 1 Reply Last reply
        3
        • R RSmirnov

          I dont need use BLE in my app, but without GPS on my android classic bluetooth device scan does not work.
          How to be? Is this a bug or expected behavior?

          In log: * qt.bluetooth.android: Search not possible due to turned off Location service *

          I use:

          QT 5.15
          Android 8.0
          Android SDK 30

          J.HilkJ Offline
          J.HilkJ Offline
          J.Hilk
          Moderators
          wrote on last edited by J.Hilk
          #3

          @RSmirnov its no bug, its a stipulation from the OS due to security

          You can potentially derive the physical location of a device when using Bluetooth without the User being aware of that. For that reason you have to enable GPS/Location service to use Bluetooth, that way the user is aware of that


          Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


          Q: What's that?
          A: It's blue light.
          Q: What does it do?
          A: It turns blue.

          1 Reply Last reply
          4
          • sierdzioS sierdzio

            @RSmirnov said in QT QBluetoothDeviceDiscoveryAgent require turn on GPS Module:

            How to be? Is this a bug or expected behavior?

            This is expected behaviour. Android requires GPS for BLE discovery. This is true not only for Qt app, but for all Android apps.

            R Offline
            R Offline
            RSmirnov
            wrote on last edited by
            #4

            @sierdzio
            "Android requires GPS for BLE discovery" - and if I only use Bluetooth Classic? It turns out that to scan devices, I will force the user to turn on GPS every time and it will be ok?

            1 Reply Last reply
            0
            • sierdzioS Offline
              sierdzioS Offline
              sierdzio
              Moderators
              wrote on last edited by
              #5

              If I recall correctly, GPS is not needed for BT classic.

              It turns out that to scan devices, I will force the user to turn on GPS every time and it will be ok?

              You don't need to force anything. Get the Android permission and system will do it automatically for you.

              (Z(:^

              R 1 Reply Last reply
              0
              • sierdzioS sierdzio

                If I recall correctly, GPS is not needed for BT classic.

                It turns out that to scan devices, I will force the user to turn on GPS every time and it will be ok?

                You don't need to force anything. Get the Android permission and system will do it automatically for you.

                R Offline
                R Offline
                RSmirnov
                wrote on last edited by
                #6

                @sierdzio Ok, I will understand why I do not observe such (system will do it automatically) behavior. Thanks!

                Pablo J. RoginaP 1 Reply Last reply
                0
                • R RSmirnov

                  @sierdzio Ok, I will understand why I do not observe such (system will do it automatically) behavior. Thanks!

                  Pablo J. RoginaP Offline
                  Pablo J. RoginaP Offline
                  Pablo J. Rogina
                  wrote on last edited by
                  #7

                  @RSmirnov if your issue is solved, please don't forget to mark your post as such! Thanks

                  Upvote the answer(s) that helped you solve the issue
                  Use "Topic Tools" button to mark your post as Solved
                  Add screenshots via postimage.org
                  Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

                  1 Reply Last reply
                  0
                  • R Offline
                    R Offline
                    RSmirnov
                    wrote on last edited by
                    #8

                    I found a solution to my problem. The topic can be closed.

                    https://bugreports.qt.io/browse/QTBUG-80394

                    1 Reply Last reply
                    1

                    • Login

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