Closed Bug 1109806 Opened 11 years ago Closed 8 years ago

Implement handoff for open tabs

Categories

(Firefox for iOS :: General, defect)

All
iOS
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME
Tracking Status
fxios + ---

People

(Reporter: st3fan, Assigned: sagittariusm25)

References

Details

Attachments

(1 file)

48 bytes, text/x-github-pull-request
Details | Review
Handoff is a technology built in to iOS 8 and OS X 10.10. It allows applications to hand over work in progress from iOS to OS X and the other way around. This means that if you are looking at a web page in Firefox for iOS and you lock your device, an Icon will appear in your Mac's Dock and Application Switcher. Selecting that icon will open the same page in a browser on your Mac. This is Mac specific, but I think still pretty useful. It is however not totally clear what the requirements are. * Is handover completely browser agnostic? In other words, can you hand over a page from Safari on the Mac to Firefox on iOS? Or would this only work between two apps of the same developer? * Does this require iCloud support on both sides? Or does this magically work over the air (wifi, bluetooth) * Does this require changes in Firefox Desktop?
Hardware: x86 → All
Dolske has a patch that gets Firefox for OSX to handle a handoff from Safari on iOS. I'll bet we need that part in place for Firefox (iOS) -> Firefox (OS X) to work.
Bug 1085391 covers making desktop Firefox respond to Handoff, so that activity on an iOS device can be handed off to Firefox (eg, load a page on mobile safari, continue viewing it on desktop). You'll want to look at the Apple docs for NSUserActivity. It's fairly trivial for simple URLs (which is what we're mostly concerned about in the browser)... To receive a handoff (ala bug 1085391), there's just some minimal glue to indicate you can receive web activities, and implement a handler that gets called. To publish a handoff looks about as simple -- although it appears that requires being an Apple-signed app, so I wasn't able to trivially test it. The magic happens through NSUserActivity, which allows an app to pass blobs of data around to instances of itself on other devices, plus an optional URL fallback when a native handler isn't available. (For example, a map app might handoff detailed state to another instance of itself, with a fallback to http://maps.google.com/?l=42.123,-87.456). Web browsers can simply pass around just URLs. (Our use case is a little special; remember that when reading the docs or you might be confused. They're geared towards native apps, with URLs as a simplified fallback.) FWIW, we could actually do Handoff better than Safari, by using the data blob to pass additional state (such as what we use for session store). (In reply to Stefan Arentz [:st3fan] from comment #0) > * Is handover completely browser agnostic? In other words, can you hand over > a page from Safari on the Mac to Firefox on iOS? Or would this only work > between two apps of the same developer? AIUI activities with a URL can be received by any app supporting that, but otherwise you can only send data blobs to other instances of your app. > * Does this require iCloud support on both sides? Or does this magically > work over the air (wifi, bluetooth) It requires iCloud, but I haven't seen a clear description of the actual mechanism. I think I read that it's using iCloud to pre-pair your devices with Bluetooth, and that the actual handoffs (or announcements of availability?) are done via BT. Presumably that allows things to work without internet access (after initial paring), but I haven't tested. > * Does this require changes in Firefox Desktop? Bug 1085391 allows desktop to receive URL handoffs. But it appears to publish one needs to be a signed app in their App Store. So that's probably not possible with Firefox, although perhaps we can work around it by having a minimal helper app or something...
tracking-fennec: --- → ?
tracking-fennec: ? → -
Let's think about this for our longer-term roadmap. Potential: * Opening links from Safari on desktop. * Opening links from Firefox on desktop, pending other work, and perhaps not possible. * Sending links to desktop. Anything we need to do here? * FxA signup? * Detecting handoff interaction _on desktop_ and offering: * Firefox for iOS in general, if not installed * FxA, if installed but not in FxA * Reminder to use Firefox for iOS, if we're sending from Safari but we have "ios" clients connected to Sync?
tracking-fxios: --- → ?
OS: Mac OS X → iOS
Attached file Pull request
Attachment #8703322 - Flags: review?(wjohnston2000)
Attachment #8703322 - Flags: review?(wjohnston2000) → review?(etoop)
Comment on attachment 8703322 [details] [review] Pull request A couple of nits but it works.
Attachment #8703322 - Flags: review?(etoop) → review+
See Also: → 1085391
Summary: Find out what we can do in terms of Handoff → Implement handoff for open tabs
(In reply to Emily Toop (:fluffyemily) from comment #5) > Comment on attachment 8703322 [details] [review] > Pull request > > A couple of nits but it works. Thank you for your review!! I updated my patch. So could you review again?
Attachment #8703322 - Flags: review+ → review?
Assignee: nobody → sagittariusm25
Status: NEW → ASSIGNED
Comment on attachment 8703322 [details] [review] Pull request Noticed this has a blank reviewer so I'll pick it up and check it out.
Attachment #8703322 - Flags: review? → review?(sleroux)
Comment on attachment 8703322 [details] [review] Pull request Thanks for the patch and sorry for the churn on this. I left some comments on the PR with some suggestions and a couple of questions but I think everything looks sane. I'll flip the r+ when we hash out some of the questions.
(In reply to Stephan Leroux [:sleroux] from comment #8) Thank you!! I updated my PR and answered your question. Please review again.
Comment on attachment 8703322 [details] [review] Pull request Clearing r? until new patch is available.
Attachment #8703322 - Flags: review?(sleroux)
Rank: 5
Depends on: 1297341
Depends on: 1353490
Depends on: 1368001
No longer depends on: 1353490
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
I found it not work on iOS 11, is it just me?
Flags: needinfo?(jdarcangelo)
This is working only for the following scenarios: - Sending a tab via Handoff on master 4921a8d37 between two iOS devices (iPad Mini 4 iOS 11.2.5 beta 2 and iPhone 6S iOS 11.1). - Sending a tab via Handoff from iOS to macOS which will be opened in Safari although Firefox is set as default browser on macOS. This is not working when: - Sending a tab via Handoff from macOS (Firefox Nightly 59.0a1 set as default browser) to iOS (iPhone 6S running iOS 11.1) - Also this is not working when sending a tab via Handoff between two iOS devices for other channels (latest Firefox Beta, latest Firefox release). Also please note that there is still work in progress on the desktop side. See Bug 1085391.
This feature was temporarily disabled in Bug 1390200. It looks to have been very recently re-enabled on master in Bug 1390293.
Flags: needinfo?(jdarcangelo)

I still can't use Handoff from Mac to iPhone, it's not a complete function and it feels uncomfortable if you can see the Firefox icon in the Mac dock but can't see one in the iPhone. Fix it please.

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

Attachment

General

Created:
Updated:
Size: