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)

ARM
Gonk (Firefox OS)
defect
Not set
normal

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.
Garner, could you please to provide a patch of example for this bug?
Flags: needinfo?(dgarnerlee)
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)
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)
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.
^ 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: nobody → allstars.chh
Thanks for your great help, Yoshi.
Flags: needinfo?(kchang)
Attachment #8376533 - Attachment is obsolete: true
Attached file PullRequest (deleted) —
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)
Attachment #8377451 - Flags: review?(alive) → review+
Comment on attachment 8377451 [details] PullRequest r+me for the manifest change.
Attachment #8377451 - Flags: review?(bfrancis) → review+
Thanks for the review, Ben and Alive. Tree is close, add checkin-needed.
Keywords: checkin-needed
Master: e3a8e318ec95bed0124ca331a5770a064fd83811
Status: NEW → RESOLVED
Closed: 11 years ago
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.

Attachment

General

Creator:
Created:
Updated:
Size: