Closed
Bug 960473
Opened 10 years ago
Closed 10 years ago
[Gaia] NFC: readNDEF failed
Categories
(Firefox OS Graveyard :: NFC, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
1.4 S1 (14feb)
People
(Reporter: allstars.chh, Assigned: psiddh)
References
Details
(Whiteboard: [FT:RIL])
Attachments
(1 file)
I found NFCTag.readNDEF() is never working, http://dxr.mozilla.org/mozilla-central/source/dom/system/gonk/NfcContentHelper.js?from=NfcContentHelper.js#377 the line new requester.MozNdefRecord(record.tnf, record.type, record.id, record.payload); is returning {} dump the object it's printing [object XrayWrapper [object MozNdefRecord]]
Reporter | ||
Updated•10 years ago
|
blocking-b2g: --- → 1.3?
Updated•10 years ago
|
Whiteboard: [FT:RIL]
Comment 1•10 years ago
|
||
Please provide user impact of the bug not being fixed in 1.3
Flags: needinfo?(allstars.chh)
Reporter | ||
Comment 2•10 years ago
|
||
readNDEF is the basic interface used to read data from a Nfc Tag. However, I am not sure if NFC will be included in v1.3.
Flags: needinfo?(allstars.chh)
Comment 3•10 years ago
|
||
Moving this to 1.4 as all the work in NFC will be in 1.4
blocking-b2g: 1.3? → 1.4?
Comment 4•10 years ago
|
||
readNDEF is important for tags that have more than one NDEF message is on the tag (there was a recent change Yoshi added to only send one up). Single messages are passed up automatically as part of the activity.
Comment 5•10 years ago
|
||
(In reply to Yoshi Huang[:allstars.chh] (Happy Chinese New Year 1.30 ~ 2.5) from comment #0) > dump the object it's printing > [object XrayWrapper [object MozNdefRecord]] Can you still access object's properties even in the frame script?
Comment 6•10 years ago
|
||
There is a mismatch between what gecko is sending and was used for applications. Given do want to remove extra copies and levels of indirection to get to the data, there's a fix application side. I've updated the WebNFC Wiki in the mean time, and can re-update if there's more discussion. Solution: For the DOM request, instead of: var recs = aDOMRequest.result.records; apps should just use var recs = aDOMRequest.result; nfc_manager.js will need to be updated. However, it only routes messages, so it doesn't currently have any real need to use readNDEF at all, as it's far faster to just use the first message it already likely has (thus, readNDEF is generally never called). To keep the original Wiki description with the extra records indirection, we'd need to create all objects in the application js compartment/window from chrome (which I just checked works), and return that. Not doing so will end up with the empty return: [{}]. A side issue is MozNdefRecord never had stringify implemented (it's in C++ currently due to this: Bug 929609).
Reporter | ||
Comment 7•10 years ago
|
||
(In reply to Garner Lee from comment #6) > > var recs = aDOMRequest.result.records; > > apps should just use > > var recs = aDOMRequest.result; > yeah, it should be a Gaia bug.
Assignee | ||
Comment 10•10 years ago
|
||
Attachment #8371907 -
Flags: review?(alive)
Updated•10 years ago
|
Attachment #8371907 -
Flags: review?(alive) → review+
Keywords: checkin-needed
Comment 11•10 years ago
|
||
Master: 8965405b0c73df406df5db2b72669f05ff5d90d6
Status: NEW → RESOLVED
Closed: 10 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 1.4 S1 (14feb)
Updated•10 years ago
|
blocking-b2g: 1.4? → ---
You need to log in
before you can comment on or make changes to this bug.
Description
•