Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved Camera stops NFC from working (QML, QT5.12.6)

    Mobile and Embedded
    3
    5
    144
    Loading More Posts
    • 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.
    • U
      UweA last edited by

      If I add "Camera" to my qml file NFC stops recognising NFC tags if the target device runs Android11. Android10 seems to work.
      That is my code:

      import QtQuick 2.12
      import QtQuick.Window 2.12
      import QtNfc 5.12
      import QtMultimedia 5.12
      
      Window {
          visible: true
          width: 640
          height: 480
          title: qsTr("Hello World")
      
          NearField {
              property bool requiresManualPolling: false
              orderMatch: false
      
              onMessageRecordsChanged: {
                  console.log("NFC-LOG: onMessageRecordsChanged")
              }
      
              onPollingChanged: {
                  console.log("NFC-LOG: onPollingChanged")
                  if (!polling && requiresManualPolling)
                      polling = true; //restart polling
              }
      
              Component.onCompleted: {
                  console.log("NFC-LOG: onCompleted")
                  if (!polling) {
                      requiresManualPolling = true;
                      polling = true;
                  }
              }
          }
      
          //Camera {
          //    id: camera
          //}
      }
      

      If I activate the last three lines (Camera) NFC does not recognise tags anymore.

      Any idea how to solve that? Seems to be a Qt bug...

      1 Reply Last reply Reply Quote 0
      • U
        UweA last edited by

        Same is true for demoproject "corkboards". Add Camera and NFC is dead.

        1 Reply Last reply Reply Quote 0
        • D
          davidovv last edited by

          Have you found a workaround for this problem?

          U 1 Reply Last reply Reply Quote 0
          • U
            UweA @davidovv last edited by

            @davidovv Unfortunately not with Qt. I switched to a native app what solves it.

            1 Reply Last reply Reply Quote 0
            • SGaist
              SGaist Lifetime Qt Champion last edited by

              Hi,

              I would say this warrants a bug report if there's not one already.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply Reply Quote 0
              • First post
                Last post