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

QtPositioning doesn't work on Android / Qt 6.8

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P0: Blocker
    • 6.8.0 Beta4
    • 6.8.0 Beta3
    • Positioning
    • None
    • linux, android ndk 26.3
    • Android

    Description

      QtPositioning doesn't work on Android / Qt 6.8.
      Building the same projects with any other older Qt version work as intended. Permissions are the same between runs. The satteliteinfo is an easy example that can show this problem.

      W qt.positioning.android: No locationManager available in QtPositioning
      W qt.positioning.android: No locationManager available in QtPositioning
      W System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'android.location.Location android.location.LocationManager.getLastKnownLocation(java.lang.String)' on a null object reference
      W System.err: 	at org.qtproject.qt.android.positioning.QtPositioning.lastKnownPosition(QtPositioning.java:131)
      W System.err: 	at org.qtproject.qt.android.QtNative.startQtApplication(Native Method)
      W System.err: 	at org.qtproject.qt.android.QtNative$$ExternalSyntheticLambda2.run(Unknown Source:0)
      W System.err: 	at org.qtproject.qt.android.QtThread$1.run(QtThread.java:25)
      W System.err: 	at java.lang.Thread.run(Thread.java:1012)
      W qt.positioning.android: No locationManager available in QtPositioning
      D qt.positioning.android: Regular updates using GPS 3333
      D qt.positioning.android: Looper Thread startup time in ms: 1
      W System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.location.LocationManager.requestLocationUpdates(java.lang.String, long, float, android.location.LocationListener, android.os.Looper)' on a null object reference
      W System.err: 	at org.qtproject.qt.android.positioning.QtPositioning.addActiveListener(QtPositioning.java:191)
      W System.err: 	at org.qtproject.qt.android.positioning.QtPositioning.startUpdates(QtPositioning.java:236)
      W System.err: 	at org.qtproject.qt.android.QtNative.startQtApplication(Native Method)
      W System.err: 	at org.qtproject.qt.android.QtNative$$ExternalSyntheticLambda2.run(Unknown Source:0)
      W System.err: 	at org.qtproject.qt.android.QtThread$1.run(QtThread.java:25)
      W System.err: 	at java.lang.Thread.run(Thread.java:1012)
      

      Attachments

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

        Activity

          People

            ivan.solovev Ivan Solovev
            emeric Emeric Grange
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes