Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-103478

QGeoPositionInfoSource on Android always asks for location permission

    XMLWordPrintable

    Details

    • Platform/s:
      Android
    • Story Points:
      3
    • Commits:
      2e26fe2c63 (qt/qtpositioning/dev) 2e26fe2c63 (qt/tqtc-qtpositioning/dev) 03cfe5e93c (qt/qtpositioning/6.4) a593ecc3fa (qt/qtpositioning/6.3) 03cfe5e93c (qt/tqtc-qtpositioning/6.4) c7921b9e0a (qt/tqtc-qtpositioning/6.2) 5338850830 (qt/tqtc-qtlocation/5.15)
    • Sprint:
      Team A Foundation Sprint 59

      Description

      While updating an app from Qt 5.12 to 5.15 and debugging location permission dialogs appearing before the app being visible, I found QTBUG-81689.

      In this change, lastKnownPosition() was changed to always ask for permissions on Android which is wrong in my opinion. The CoreLocation implementation of this function just returns the last known position without asking for permission as the documentation describes it.

      The QML element PositionSource on Android now asks for permissions when it is being created since componentCompleted() inserts the last known position. This makes its "active" parameter completely useless since there is no way to control when the permission dialog should appear.

        Attachments

        1. location-bug.zip
          2 kB
        2. QTBUG-103478-1.png
          QTBUG-103478-1.png
          76 kB
        3. QTBUG-103478-2.png
          QTBUG-103478-2.png
          59 kB
        4. QTBUG-103478-3.png
          QTBUG-103478-3.png
          58 kB

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              ivan.solovev Ivan Solovev
              Reporter:
              theoriginalgri Christoph Keller
              PM Owner:
              Vladimir Minenko Vladimir Minenko
              RnD Owner:
              Alex Blasche Alex Blasche
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: