Closed Bug 1108973 Opened 10 years ago Closed 9 years ago

Check nfc-ndef-discovered MozActivity

Categories

(Firefox OS Graveyard :: NFC, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: allstars.chh, Unassigned)

References

Details

nfc_manager.js in System app will fire a MozActivity whose name is nfc-ndef-discovered.
However I think the naming is inaccurate because that's no NDEF inside this MozActivity.
nfc-ndef-discovered is fired if two conditions are met:
1. There is at least 1 NDEF record present in the system message received from Gecko
2. The 1st NDEF record in the message does not contain payload which is handled by gaia apps [1]

[1] - https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/nfc_manager.js#L488
(Sorry submitted comment 1 by mistake, this is its continuation)

nfc-ndef-discovered contains decoded data of the first NDEF record as well as an array of all NDEF records (raw bytes). So it actually contains NDEF inside. 

Do you have some other name in mind for the activity? W3C in the latest spec introduces NfcMessageData [1], but they are considering situation in which the data will be decoded by the OS also from some proprietary data format, not only NDEF. In our case we handle only NDEF.

[1] http://w3c.github.io/nfc/index.html#the-nfcmessagedata-interface
I probably didn't sleep well on that day. :/
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.