Unable to sendFile through NFC from gaia app

RESOLVED DUPLICATE of bug 933093

Status

Firefox OS
NFC
RESOLVED DUPLICATE of bug 933093
4 years ago
4 years ago

People

(Reporter: johnhu, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

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

Comment 1

4 years ago
Hi John, see still open implementation Bug 933093.

Dup, or this a test case?

Updated

4 years ago
Depends on: 933093
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.

Comment 3

4 years ago
Arno, any comment. Thanks.
Flags: needinfo?(arno)

Comment 4

4 years ago
(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.
Flags: needinfo?(arno)
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.