Last Comment Bug 726335 - Use NDEF Push with NFC (Android Beam | API level 14) for transferring currently focused tab
: Use NDEF Push with NFC (Android Beam | API level 14) for transferring current...
Status: RESOLVED FIXED
[NFC]
: feature
Product: Firefox for Android
Classification: Client Software
Component: General (show other bugs)
: unspecified
: ARM Android
: -- enhancement with 1 vote (vote)
: Firefox 24
Assigned To: (Back on May31) Kartikaya Gupta (email:kats@mozilla.com)
:
Mentors:
Depends on: 848901 849281 879369
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-11 11:28 PST by Aaron Train [:aaronmt]
Modified: 2013-09-02 12:46 PDT (History)
16 users (show)
curtisk: sec‑review? (mgoodwin)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
24+
-
-


Attachments
Cosmetic cleanup (2.88 KB, patch)
2013-03-04 09:28 PST, (Back on May31) Kartikaya Gupta (email:kats@mozilla.com)
mark.finkle: review+
Details | Diff | Review
Receive URIs over NFC (4.30 KB, patch)
2013-03-04 09:29 PST, (Back on May31) Kartikaya Gupta (email:kats@mozilla.com)
mark.finkle: review+
Details | Diff | Review
Receive URIs over NFC (v2) (4.52 KB, patch)
2013-03-05 02:02 PST, (Back on May31) Kartikaya Gupta (email:kats@mozilla.com)
bugmail.mozilla: review+
Details | Diff | Review
Receive URIs over NFC (v3) (4.47 KB, patch)
2013-03-05 02:44 PST, (Back on May31) Kartikaya Gupta (email:kats@mozilla.com)
bugmail.mozilla: review+
Details | Diff | Review
Allow sending current tab over Beam (3.39 KB, patch)
2013-03-05 02:44 PST, (Back on May31) Kartikaya Gupta (email:kats@mozilla.com)
mark.finkle: review+
Details | Diff | Review

Description Aaron Train [:aaronmt] 2012-02-11 11:28:55 PST
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
Comment 1 Kevin Brosnan [:kbrosnan] 2012-03-06 13:33:39 PST
Not in the 1.0 scope.
Comment 2 (Back on May31) Kartikaya Gupta (email:kats@mozilla.com) 2013-03-04 09:28:27 PST
Created attachment 720761 [details] [diff] [review]
Cosmetic cleanup
Comment 3 (Back on May31) Kartikaya Gupta (email:kats@mozilla.com) 2013-03-04 09:29:11 PST
Created attachment 720762 [details] [diff] [review]
Receive URIs over NFC

We probably want to defer this until we do a permission batch upgrade.
Comment 4 Mark Finkle (:mfinkle) (use needinfo?) 2013-03-04 10:47:23 PST
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
Comment 5 (Back on May31) Kartikaya Gupta (email:kats@mozilla.com) 2013-03-05 01:43:09 PST
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?
Comment 6 Mark Finkle (:mfinkle) (use needinfo?) 2013-03-05 01:52:56 PST
(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.
Comment 7 (Back on May31) Kartikaya Gupta (email:kats@mozilla.com) 2013-03-05 01:58:51 PST
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.
Comment 8 (Back on May31) Kartikaya Gupta (email:kats@mozilla.com) 2013-03-05 02:02:17 PST
Created attachment 721132 [details] [diff] [review]
Receive URIs over NFC (v2)

Updated, carrying r+
Comment 9 (Back on May31) Kartikaya Gupta (email:kats@mozilla.com) 2013-03-05 02:44:17 PST
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.
Comment 10 (Back on May31) Kartikaya Gupta (email:kats@mozilla.com) 2013-03-05 02:44:49 PST
Created attachment 721154 [details] [diff] [review]
Allow sending current tab over Beam
Comment 11 (Back on May31) Kartikaya Gupta (email:kats@mozilla.com) 2013-03-05 05:12:42 PST
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.
Comment 13 Curtis Koenig [:curtisk-use curtis.koenig+bzATgmail.com]] 2013-03-11 16:38:10 PDT
There have been some very interesting flaws shown at security conferences regarding NFC, marking this for sec-review after the fact.
Comment 14 Alex Keybl [:akeybl] 2013-03-29 13:24:19 PDT
We won't note given bug 847898. We'll note once the feature is more ready for release.
Comment 15 Alex Keybl [:akeybl] 2013-09-02 12:46:59 PDT
Adding the feature keyword to be included in the new Release Tracking page.

Note You need to log in before you can comment on or make changes to this bug.