Use NDEF Push with NFC (Android Beam | API level 14) for transferring currently focused tab

RESOLVED FIXED in Firefox 24

Status

()

Firefox for Android
General
--
enhancement
RESOLVED FIXED
6 years ago
9 months ago

People

(Reporter: aaronmt, Assigned: kats)

Tracking

({feature})

unspecified
Firefox 24
ARM
Android
feature
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(relnote-firefox 24+, blocking-fennec1.0 -, fennec-)

Details

(Whiteboard: [NFC])

Attachments

(3 attachments, 2 obsolete attachments)

(Reporter)

Description

6 years ago
Make use of the available NFDEF Push with NFC (Android Beam, API level 14) to transfer the currently focused tab from phone to phone.

* http://developer.android.com/sdk/android-4.0.html
* http://developer.android.com/reference/android/nfc/NdefMessage.html
* http://developer.android.com/resources/samples/AndroidBeamDemo/src/com/example/android/beam/Beam.html
* http://developer.android.com/guide/topics/nfc/nfc.html
tracking-fennec: --- → -
Not in the 1.0 scope.
blocking-fennec1.0: --- → -
Created attachment 720761 [details] [diff] [review]
Cosmetic cleanup
Attachment #720761 - Flags: review?(mark.finkle)
Created attachment 720762 [details] [diff] [review]
Receive URIs over NFC

We probably want to defer this until we do a permission batch upgrade.
Attachment #720762 - Flags: review?(mark.finkle)
Attachment #720761 - Flags: review?(mark.finkle) → review+
Comment on attachment 720762 [details] [diff] [review]
Receive URIs over NFC


>+                <action android:name="android.nfc.action.NDEF_DISCOVERED"/>
>+                <category android:name="android.intent.category.DEFAULT" />
>+                <data android:scheme="http" />
>+                <data android:scheme="https" />

I suppose we don't need to worry about ftp or any other protocols

>-        } else if (Intent.ACTION_VIEW.equals(action)) {
>+        } else if (Intent.ACTION_VIEW.equals(action)
>+            || (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD_MR1
>+                && NfcAdapter.ACTION_NDEF_DISCOVERED.equals(action))) {

I cringe a little at the increased complexity of the "if" test. I'd almost be OK with treating it as a separate condition, even though the 2 lines of code would be duped.

As it stands right now, we'll need to comment this out when it hits Beta. There is a wiki page for managing that process:
https://wiki.mozilla.org/Release_Management/Merge_Documentation
Attachment #720762 - Flags: review?(mark.finkle) → review+
Actually, should most of this onNewIntent stuff be moved to BrowserApp.java instead? I assume we don't want to be doing this in web apps, right?
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #5)
> Actually, should most of this onNewIntent stuff be moved to BrowserApp.java
> instead? I assume we don't want to be doing this in web apps, right?

That's a better idea.
Ah, the intents don't get triggered on web apps anyway because the manifest entries are in the "App" activity, so it's not technically a problem, but I moved it over anyway for less confusion.
Created attachment 721132 [details] [diff] [review]
Receive URIs over NFC (v2)

Updated, carrying r+
Attachment #720762 - Attachment is obsolete: true
Attachment #721132 - Flags: review+
Created attachment 721152 [details] [diff] [review]
Receive URIs over NFC (v3)

Updated to use "10" instead of the version code name to be consistent with the rest of BrowserApp.
Assignee: nobody → bugmail.mozilla
Attachment #721132 - Attachment is obsolete: true
Attachment #721152 - Flags: review+
Created attachment 721154 [details] [diff] [review]
Allow sending current tab over Beam
Attachment #721154 - Flags: review?(mark.finkle)
Attachment #721154 - Flags: review?(mark.finkle) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/b9fa7600200f
https://hg.mozilla.org/integration/mozilla-inbound/rev/a38ff8b11dc0
https://hg.mozilla.org/integration/mozilla-inbound/rev/9d6d7796e284

I filed bug 847898 for the disable/backout and updated the wiki page at https://wiki.mozilla.org/Release_Management/Merge_Documentation#Known_Backouts_for_Version with the bug number. Not sure if anything else needs to be done here right now.
https://hg.mozilla.org/mozilla-central/rev/b9fa7600200f
https://hg.mozilla.org/mozilla-central/rev/a38ff8b11dc0
https://hg.mozilla.org/mozilla-central/rev/9d6d7796e284
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 22
Depends on: 848901

Updated

4 years ago
Depends on: 849281
There have been some very interesting flaws shown at security conferences regarding NFC, marking this for sec-review after the fact.
Flags: sec-review?
Flags: sec-review? → sec-review?(mgoodwin)

Updated

4 years ago
relnote-firefox: --- → ?
We won't note given bug 847898. We'll note once the feature is more ready for release.
relnote-firefox: ? → -

Updated

4 years ago
Whiteboard: [NFC]
Depends on: 879369

Updated

4 years ago
relnote-firefox: - → ?
Target Milestone: Firefox 22 → Firefox 24

Updated

4 years ago
relnote-firefox: ? → 24+
Adding the feature keyword to be included in the new Release Tracking page.
Keywords: feature
Flags: sec-review?(mgoodwin)
You need to log in before you can comment on or make changes to this bug.