Closed
Bug 972788
Opened 11 years ago
Closed 11 years ago
[NFC] After reading a NFC tag with URL data, browser should be launched and then connect to that URL.
Categories
(Firefox OS Graveyard :: Gaia::Browser, defect)
Tracking
(b2g-v1.4 fixed)
RESOLVED
FIXED
1.4 S2 (28feb)
Tracking | Status | |
---|---|---|
b2g-v1.4 | --- | fixed |
People
(Reporter: kchang, Assigned: allstars.chh)
References
Details
Attachments
(1 file, 1 obsolete file)
After reading a NFC tag with URL data, browser should be launched and then connect to that URL.
Reporter | ||
Comment 1•11 years ago
|
||
Garner, could you please to provide a patch of example for this bug?
Flags: needinfo?(dgarnerlee)
Comment 2•11 years ago
|
||
Sure, I can post a patch.
A few general steps for NFC tags before then:
- Add nfc readonly or readwrite permissions to the app manifest.
- Add activity declaration in manifest (so system has a app target nfc-technology-discovered), wide open URL filter.
- Implement stub activity handler (so app can process the activity messages)
(UI reaction to the above additions: See activity picker come up to choose the browser, if it's not the only target).
Then:
- Add URL handler code for the pre-parsed URI that comes with the message data.
- Open Browser tab with that URI/URL.
Flags: needinfo?(dgarnerlee)
Comment 3•11 years ago
|
||
Ken: the permssions and manifest already exist due to P2P implementation, however, perhaps the NFC Tag function code can be added to that file as well.
Flags: needinfo?(kchang)
Comment 4•11 years ago
|
||
One more thing:
The 8376533 patch uses the pre-parsed NDEF Record on the tag (or other device).
Complete handling actually means reading the complete tag (that is, more than the first NDEF record), so there needs to be a readNDEF in there if the browser the browser for some reason expects more data. For simple NDEFs however, the pre-parsed one is the fastest way to handle NDEF messages. It takes a bit more time to do the readNDEF with the user holding the phone out.
Comment 5•11 years ago
|
||
^ Correction, the first NDEF Message (NDEFRecord array) is sent along with the Activity too, not all messages. This is the usual case, given common NFC tags are just 144 bytes or so.
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → allstars.chh
Assignee | ||
Updated•11 years ago
|
Attachment #8376533 -
Attachment is obsolete: true
Assignee | ||
Comment 7•11 years ago
|
||
r? to Alive for nfc_manager changes
r? to Ben for updating the manifest of Browser.
Attachment #8377451 -
Flags: review?(bfrancis)
Attachment #8377451 -
Flags: review?(alive)
Updated•11 years ago
|
Attachment #8377451 -
Flags: review?(alive) → review+
Comment 8•11 years ago
|
||
Comment on attachment 8377451 [details]
PullRequest
r+me for the manifest change.
Attachment #8377451 -
Flags: review?(bfrancis) → review+
Assignee | ||
Comment 9•11 years ago
|
||
Thanks for the review, Ben and Alive.
Tree is close, add checkin-needed.
Keywords: checkin-needed
Comment 10•11 years ago
|
||
Master: e3a8e318ec95bed0124ca331a5770a064fd83811
Status: NEW → RESOLVED
Closed: 11 years ago
status-b2g-v1.4:
--- → fixed
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 1.4 S2 (28feb)
You need to log in
before you can comment on or make changes to this bug.
Description
•