Closed
Bug 1042851
(b2g-nfc-privilege)
Opened 10 years ago
Closed 10 years ago
(meta) [NFC] Make NFC APIs available to privileged webapps
Categories
(Firefox OS Graveyard :: NFC, defect)
Tracking
(feature-b2g:2.2+)
People
(Reporter: dgarnerlee, Assigned: vchang)
References
Details
(Keywords: dev-doc-complete)
Current NFC APIs, as represented by MozNFCTag and MozNFCPeer are certified only by permission settings. Improving NFC APIs and investigating how to open them up to more than certitified app permissions will be necessary, as the complimentary Secure Element APIs (Bug 879861) will also be targeted at privilaged level permissions eventually.
Blocks: ExposeAPIs
Depends on: 1048676
Depends on: 1052309
Depends on: 1007724
Depends on: 1055560
Depends on: 1053732
Depends on: 1073421
Depends on: 1074611
Depends on: 1082300
Depends on: 1082303
Depends on: 1082440
Depends on: 1082443
Depends on: 1082445
Depends on: 1082453
Depends on: 991970
No longer depends on: 1082303
Depends on: 1082475
Summary: (meta) [NFC] Make NFC APIs available to privilaged webapps instead of certified only. → (meta) [NFC] Make NFC APIs available to privileged webapps instead of certified only.
Depends on: 1082493
Depends on: 1082992
Summary: (meta) [NFC] Make NFC APIs available to privileged webapps instead of certified only. → (meta) [NFC] Make NFC APIs available to privileged webapps
Alias: b2g-nfc-privilege
Depends on: 1054139
Depends on: 1085292
Depends on: 1086179
Depends on: 1087853
Depends on: 1087925
Depends on: 1090803
Depends on: 1091356
Depends on: 1093483
Updated•10 years ago
|
feature-b2g: 2.2? → 2.2+
According to Comment 0, the purpose is to let privilege app to use NFC API. Remove dependencies as most bugs are not related to this.
Depends on: 1090803
Depends on: 1087925
No longer depends on: 1087925
No longer depends on: 1090803
Depends on: 1094147
Depends on: 1094148
(In reply to Yoshi Huang[:allstars.chh] from comment #2)
> According to Comment 0, the purpose is to let privilege app to use NFC API.
> Remove dependencies as most bugs are not related to this.
Given now there's no User Story defined how to read a tag, operate on a tag, or using other NFC Technology to operator on it, or how foreground app should acquire the tag, and also using custom P2P Sharing UI is not defined yet (Can custom Sharing UI override HOME key? Does it need to vibrate?) There are many things unclear yet, so I also removed the dependencies here.
Updated•10 years ago
|
User Story: (updated)
Comment 4•10 years ago
|
||
Hi Yoshi, I have updated the user story to indicate priority 1 and priority 2 use cases. Can you help list any open items for each? The priority 2 items could go its own separate bug if needed, and we can use this bug for priority 1 items.
Flags: needinfo?(allstars.chh)
Depends on: 1095417
Hi Sandip
This is a meta bug for engineering bugs, please file a seperate bug for User Story.
Also the meta bug for NFC user story is Bug 933150.
Flags: needinfo?(allstars.chh)
Summary: (meta) [NFC] Make NFC APIs available to privileged webapps → (meta) [NFC] Make NFC Peer APIs available to privileged webapps
Comment 6•10 years ago
|
||
[NI to Jonas and Tim as head up]
Hope the communication isn't too late.
We are about to make these NFC p2p sharing APIs privileged in 2.2.
But within 2.2 timeframe it's less likely to move shrinking UI out of system app clearly.
The current plan is to approach the final goal step by step.
Flags: needinfo?(timdream)
Flags: needinfo?(jonas)
Comment 7•10 years ago
|
||
I basically agree with Jonas on our previous conclusion that we should aim to expose a proper API and solid app-launch flow than expose and change it later. But obviously you have some other concerns.
Jonas can help you on how to migrate it.
Flags: needinfo?(timdream)
Like I've said since before the current API landed: We need to move the UX from the API and into apps themselves. The current API is not a generic NFC API, it's a NFC sharing API, no other use cases are currently possible.
If we want to support sharing through NFC exposed to third party apps, it's better that we do that through WebActivities.
Flags: needinfo?(jonas)
User Story: (updated)
(In reply to Jonas Sicking (:sicking) from comment #8)
> If we want to support sharing through NFC exposed to third party apps, it's
> better that we do that through WebActivities.
I think what Jonas meant is we need to implement a MozActivity which implements share through 'nfc', see some comments from Bug 963531.
And this MozActivity could be from System app or a 3rd party app if user wants a different sharing exprience.
If this is what we are going to do, then make Share API privilege should be landed *after* shared by Activity is done.
Comment 10•10 years ago
|
||
Writing the sharing activity will also help to validate NFC sharing API as a whole before exposing it.
I assume we could introduce an 'nfc-share' activity handler (nfcManager seems a good place), which will:
1. Validate the payload.
2. Start to listen for onpeerfound.
3. Show visual info requesting the user to put the phone against nfc peer, show cancel share button.
4. Send the payload once nfc peer is detected. Update UI to show status of sending.
5. Stop listening for onpeerfound and close activity handler.
Comment 11•10 years ago
|
||
Is the Activity going to be the only way for non-certified apps to do peer-to-peer interactions with NFC?
Or can privileged apps use the API directly instead of having the experience mediated via the Activity?
Assignee | ||
Comment 12•10 years ago
|
||
I think we can use sendNDEF/sendFile/onpeerready in privileged application after this bug is fixed.
Since Jonas suggests not to open NFC Share API, I'll update the subject and dependencies.
Depends on: 1054139, 1082300, 1082440, 1082443, 1082445, 1082453, 1082493, 1082992, 1085292, 1086179, 1087925, 1090803, 1093483, 963541, 964194, 991970, 1003268, 1007724, 1046554, 1047233, 1052309, 1053732, 1055560, 1073421, 1074611, 1087853
Summary: (meta) [NFC] Make NFC Peer APIs available to privileged webapps → (meta) [NFC] Make NFC APIs available to privileged webapps
No longer depends on: 1093483
Updated•10 years ago
|
QA Whiteboard: [COM=NFC]
No longer depends on: 1095417
Blocks: 1108967
Depends on: 1109458
Updated•10 years ago
|
QA Whiteboard: [COM=NFC] → [COM=NFC][2.2-feature-qa+]
Updated•10 years ago
|
Assignee: nobody → vchang
Flags: needinfo?(whuang)
Assignee | ||
Updated•10 years ago
|
Target Milestone: --- → 2.2 S6 (20feb)
Updated•10 years ago
|
Status: NEW → ASSIGNED
Updated•10 years ago
|
QA Whiteboard: [COM=NFC][2.2-feature-qa+] → [COM=NFC]
Updated•10 years ago
|
QA Whiteboard: [COM=NFC]
Depends on: 1126653
Depends on: 1120315
Depends on: 1127726
Assignee | ||
Comment 15•10 years ago
|
||
All the dependent bugs are fixed, let's close this.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Depends on: 1129841
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Updated•10 years ago
|
Keywords: dev-doc-needed
Depends on: 1131454
Depends on: 1131964
Depends on: 1133390
Assignee | ||
Comment 16•10 years ago
|
||
Hi Yoshi, can we close this bug? It looks like all the dependency bugs are fixed in 2.2 and m-c.
Flags: needinfo?(allstars.chh)
Status: REOPENED → RESOLVED
Closed: 10 years ago → 10 years ago
Flags: needinfo?(allstars.chh)
Resolution: --- → FIXED
Comment 17•9 years ago
|
||
I've gone through the MDN docs and made sure that it is clear that NFC is privileged in 2.2+.
https://developer.mozilla.org/en-US/docs/Web/API/NFC_API
https://developer.mozilla.org/en-US/Apps/Build/App_permissions
Keywords: dev-doc-needed → dev-doc-complete
You need to log in
before you can comment on or make changes to this bug.
Description
•