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

PositionSource remains inactive on android

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.9.2
    • 5.9.1, 5.10
    • Positioning
    • None

    Description

      On a Pixel C, PositionSource never turns active, using code like

          PositionSource {
              id: ps
              updateInterval: 1000
              active: true
      
              function posToString(pos)
              {
                  if ((pos).isValid)
                      return (pos).latitude.toFixed(4) + ", " + (pos).longitude.toFixed(4)
                  else
                      return "Unknown"
              }
      
              function posString() {
                  return posToString(ps.position.coordinate)
              }
      
      
              Component.onCompleted: {
                  console.log("PositionSource error: ", errorString, (ps.sourceError === PositionSource.NoError), (ps.active === true))
              }
      
              property string errorString : errorEnumToString(ps.sourceError)
      
              onSourceErrorChanged: {
                      errorString = errorEnumToString(ps.sourceError)
                      console.log("PositionSource error: ", errorString, (ps.sourceError === PositionSource.NoError), (ps.active === true))
              }
      
              function errorEnumToString(enu)
              {
                  var errString = "";
                  if (sourceError === PositionSource.NoError)
                      errString = "NoError"
                  else if (sourceError === PositionSource.AccessError)
                      errString = "AccessError"
                  else if (sourceError === PositionSource.ClosedError)
                      errString = "ClosedError"
                  else if (sourceError === PositionSource.UnknownSourceError)
                      errString = "UnknownSourceError"
                  else if (sourceError === PositionSource.SocketError)
                      errString = "SocketError"
                  return errString
              }
          }
      

      Attachments

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

        Activity

          People

            ablasche Alex Blasche
            paangele Paolo Angelelli
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes