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

Add ACTION_TAG_DISCOVERED to IntentFilter in QtNfc.java

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • P2: Important
    • 5.9.0 Beta 1
    • 5.6.2, 5.7.1, 5.8.0, 5.9.0 Alpha
    • Connectivity: NFC
    • None
    • Android 4.4.4

    Description

      Now Qt NFC detect only NDEF tags, signals targetDetected/targetLost are never fired for simple tags (extended description of issues: http://stackoverflow.com/questions/33346378/how-to-get-nfc-working-on-android-using-qt-5-6) because in QtNfc.java in start function it filters only ACTION_NDEF_DISCOVERED actions (and ACTION_TECH_DISCOVERED for NDEF tags that will report as tech) *without* simple ACTION_TAG_DISCOVERED.

      But there are quite a lot scenarios when there is only uid of simple tags is needed.

      So suggestion is to add another one IntentFilter for ACTION_TAG_DISCOVERED:

      IntentFilter[] filters = new IntentFilter[3];
      filters[0] = new IntentFilter();
      filters[0].addAction(NfcAdapter.ACTION_TAG_DISCOVERED);
      filters[0].addCategory(Intent.CATEGORY_DEFAULT);
      ...
      

      And change ACTION_NDEF_DISCOVERED filter to ACTION_TAG_DISCOVERED in setContext function.

      Especially given the fact that getStartIntent already handles ACTION_TAG_DISCOVERED actions.

      Attachments

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

        Activity

          People

            ablasche Alex Blasche
            lukegluke Oleg
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes