Details
-
Suggestion
-
Resolution: Done
-
P2: Important
-
5.6.2, 5.7.1, 5.8.0, 5.9.0 Alpha
-
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
For Gerrit Dashboard: QTBUG-59455 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
188351,2 | Fix detecting simple NFC tags | 5.9 | qt/qtconnectivity | Status: MERGED | +2 | 0 |