Closed
Bug 986361
Opened 11 years ago
Closed 11 years ago
B2G NFC: Remove NFCPeer.sendFile
Categories
(Firefox OS Graveyard :: NFC, defect)
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: allstars.chh, Assigned: psiddh)
References
Details
It seems NFCPeer.sendFile is just a dummy API call, Gaia apps(Music, Video or Galley) calls this API, then Chrome process just broadcasts the message back to the gaia (System app), then starts bluetooth transfer. Can we remove this sendFile interface from NFCPeer, and then Gaia apps could just use MozActivity to do the transfer?
Reporter | ||
Comment 1•11 years ago
|
||
Sidd, can you comment on this? What's the purpose of NFCPeer.sendFile ? Can we remove it?
Flags: needinfo?(psiddh)
Updated•11 years ago
|
Blocks: b2g-NFC-2.0
Updated•11 years ago
|
Assignee: nobody → psiddh
Hi Yoshi, Maybe the question to be asked is, - Do we want to expose the process of 'initiating the handover process' as a DOM call or not ? -- In favor of exposing it as DOM API, a) W3C Nfc specification does have a similar api . http://www.w3.org/TR/2014/WD-nfc-20140114/#widl-NFCPeer-startHandover-Promise-HandoverType-handoverType (Maybe an option to rename the api to 'startHandOver()' or something - Not sure about it) b) Correct me here, this was decided during Taipei work week and a general consensus was arrived at that by having an API such as this, will give a consistent / simple DOM API for Gaia developers for supporting 'handover scenarios' at the application level. -- Against exposing it as DOM API, a) 'sendFile' dom call is just a dummy call / proxy to route the 'blob' data all the way to System app (where the core 'handover logic' resides). From the design point of view this is may not be ideal. b) Through 'mozActivities' or some other inter app communication model, we may have a simpler flow of the usecase. (That said, would like to know a bit more about the alternative proposal that you have in mind) Also requesting Arno, others to comment on this.
The sendFile() happens in the context of onpeerready(). At the time onpeerready() is called, the user has confirmed the sharing of information (i.e., sending the file) by triggering the "shrinking UI". If you use a MozActivity to trigger the file transfer, another app might "sneak" into the interaction by sending a MozActivity. The benefit of sendFile() is that it can only be called by the application for which the user has authorized the file transfer (via the shrinking UI). I suggest to keep sendFile().
Flags: needinfo?(arno)
Comment 4•11 years ago
|
||
(In reply to arno from comment #3) > The sendFile() happens in the context of onpeerready(). At the time > onpeerready() is called, the user has confirmed the sharing of information > (i.e., sending the file) by triggering the "shrinking UI". If you use a > MozActivity to trigger the file transfer, another app might "sneak" into the > interaction by sending a MozActivity. The benefit of sendFile() is that it > can only be called by the application for which the user has authorized the > file transfer (via the shrinking UI). I suggest to keep sendFile(). Moreover, sendFile() is common interface for all Apps to notify NFC manager/connection manager which file want to be transferred. and then NFC manager/connection manager will decide which transferring interface should be used. I remembered that we had discussed this in Taipei work. If I have wrong memory, please correct me.
Reporter | ||
Comment 6•11 years ago
|
||
In the first place, Eric's idea is to NOT to pass the blob to Gecko and broadcast it to Gaia again, so we could avoid Bug 964693. But as Sidd mentioned in Copmment 2 and Arno mentioned in Comment 3 "by having an API such as this, will give a consistent / simple DOM API for Gaia developers for supporting 'handover scenarios' at the application level." "If you use a MozActivity to trigger the file transfer, another app might "sneak" into the interaction by sending a MozActivity." So I think the conclusion is to keep this API (sendFile). I'll close this bug as INVALID.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•