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. Nfc & foreground app
Forum Updated to NodeBB v4.3 + New Features

Nfc & foreground app

Scheduled Pinned Locked Moved Solved Mobile and Embedded
6 Posts 2 Posters 1.5k Views 1 Watching
  • 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.
  • D Offline
    D Offline
    daviraim
    wrote on last edited by
    #1

    Hi all,

    For an armv7 mobile app, I used the NFC interface. I just need to read the smartcard identifier. My app only uses the QNearFieldManager object & the targetDetected signal. When the signal fires, I get the uid through the uid() method.

    It works proprely... but a starting behavior is strange & I don't understand how to solve it.

    When I launch the app & that I approach a NFC tag, an other app seems to take the information (my application does not see the tag). If I reduce my app & then I maximize it, everything works nice.

    I added the intent section in the manifest before the default one, but the problem is already present. On some devices, I need to click the screen on the app to fix the problem (focus ?)... the problem is not systematic. I have a little trouble understanding knowing that an application that launches theoretically has the focus. I tried with a Galaxy S8 (same pb).

    Target : Qt 5.9.2, QtcCreator 4.4.1, NDK r11c, Android 5.1.1

    Thank you very much for your proposals and / or ideas about that problem.
    Sincerely,
    David.

    ekkescornerE 1 Reply Last reply
    0
    • D daviraim

      Hi all,

      For an armv7 mobile app, I used the NFC interface. I just need to read the smartcard identifier. My app only uses the QNearFieldManager object & the targetDetected signal. When the signal fires, I get the uid through the uid() method.

      It works proprely... but a starting behavior is strange & I don't understand how to solve it.

      When I launch the app & that I approach a NFC tag, an other app seems to take the information (my application does not see the tag). If I reduce my app & then I maximize it, everything works nice.

      I added the intent section in the manifest before the default one, but the problem is already present. On some devices, I need to click the screen on the app to fix the problem (focus ?)... the problem is not systematic. I have a little trouble understanding knowing that an application that launches theoretically has the focus. I tried with a Galaxy S8 (same pb).

      Target : Qt 5.9.2, QtcCreator 4.4.1, NDK r11c, Android 5.1.1

      Thank you very much for your proposals and / or ideas about that problem.
      Sincerely,
      David.

      ekkescornerE Offline
      ekkescornerE Offline
      ekkescorner
      Qt Champions 2016
      wrote on last edited by
      #2

      @daviraim don't know if this is related, but AFAIK you should use NDKr10e https://wiki.qt.io/Qt_for_Android_known_issues

      ekke ... Qt Champion 2016 | 2024 ... mobile business apps
      5.15 --> 6.9 https://t1p.de/ekkeChecklist
      QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

      1 Reply Last reply
      0
      • D Offline
        D Offline
        daviraim
        wrote on last edited by
        #3

        Hi forum !

        Thanks, but the problem is always present with the NDKr10e.
        Any other suggestions/ideas ?
        Thanks a lot.

        David.

        1 Reply Last reply
        0
        • D Offline
          D Offline
          daviraim
          wrote on last edited by
          #4

          Same behaviour with NDKr15. It still works after reducing & expanding the application. Is there something to specify in the manifest to give the focus to the app ?
          In other words, what can happen when the application is reduced/maximized and which miss when launching the application ?
          Thanks a lot.
          David.

          1 Reply Last reply
          0
          • D Offline
            D Offline
            daviraim
            wrote on last edited by
            #5

            Hi all,

            Same problem with the qml poster Qt examples (Examples/Qt-5.9.2/nfc/poster).
            Can anyone try on his side ?
            Thanks a lot.

            David.

            1 Reply Last reply
            0
            • D Offline
              D Offline
              daviraim
              wrote on last edited by
              #6

              I found a solution to that problem.
              To solve that issue, we just need to start the NFC module with a slight delay (I tested with 100ms).
              So, now I launch the application & 100ms later I create the QNearFieldManager object and then I start the detection (startTargetDetection). There is no need for a delay between the manager creation & the start detection method call.

              Thanks to all.
              David.

              1 Reply Last reply
              2

              • Login

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