With the patch of bug 933093, we should have the ability to send a file when onpeerready is called. I had tried multiple cases to trigger it. But the patch of bug 933093 doesn't receive the event. If we assume the patch of bug 933093 is correct, this bug should belong to gecko patch. The code under onpeerready are: Case 1: var peer = navigator.mozNfc.getNFCPeer(event.detail); peer.sendFile(file); (In this case, peer is got but nothing happens) Case 2: var peer = navigator.mozNfc.getNFCPeer(event); peer.sendFile(file); (In this case, peer is got but nothing happens) Case 3: var peer = navigator.mozNfc.sendFile(file); (In this case, I don't know what's going on) BTW, if none of the above codes are correct, please use this bug to update the document: https://wiki.mozilla.org/WebAPI/WebNFC, so that others can know how to use it.
Summary: Unable t sendFile through NFC from gaia app → Unable to sendFile through NFC from gaia app
Hi John, see still open implementation Bug 933093. Dup, or this a test case?
Garner, I know 933093 is still opening. I had applied all patches of bug 933093. But none of them are called after I call the API. If you feel the patch of bug 933093 is incorrect, please duplicate this one as bug 933093. If you feel the patch of bug 933093 is correct, this may be a bug inside gecko.
Arno, any comment. Thanks.
(In reply to John Hu [:johnhu] from comment #0) John: you are doing the right thing. Please note that the patch I'm working on only provides the system-app level functionality of sendFile(). What is not part of this patch are the Gecko changes to wire-up the sendFile() DOM API with handleFileTransfer in nfc_handover,js. Sid is working on the Gecko changes and will submit a patch shortly.
Judging from from the date, I think latest patch in Bug 933093 already fixed this.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 933093
You need to log in before you can comment on or make changes to this bug.