Open Bug 1139577 Opened 5 years ago Updated 4 years ago

Support download 'hand-off'


(Firefox for iOS :: General, defect)

iOS 8
Not set



Tracking Status
fxios + ---


(Reporter: aaronmt, Unassigned)




(Whiteboard: drop?)


(3 files)

Attached image Safari screenshot

Nothing happens


  Show the file and file-size and an 'Open In' button (see Safari)


  Nothing happens

People download files browsers including Safari, we have to do something other than displaying nothing.
Summary: Support download hand-off → Support download 'hand-off'
Attachment #8572825 - Attachment description: Screen Shot 2015-03-04 at 3.12.11 PM.png → Safari screenshot
Attached image Chrome screenshot
Looks like Chrome supports downloads all-together
I think Chrome just calls it downloads... it animates the file downloading and then presents the standard Open In... dialog (I suppose pre-downloading the file like that is nice?)

Good catch though Aaron!
tracking-fennec: ? → +
Some browsers do in fact have a stash for putting downloads (Mercury Browser, for instance, does this). But IMHO handing them off to an appropriate app, if one exists, makes more sense.
This isn't ready for review yet. Just putting it up for any feedback. This uses our SnackBars as a way to show downloads:

1.) We prompt for saving with a snackbar. If you select "Download", we
2.) use a different snackbar to show download progress. When its done, we
3.) use a third one to ask if you want to open it. Opening will (always) have options like Mail or Message so you can send the file to someone. Some other apps (IRCCloud for me) also appear as I have it now. 

video at

This also makes it so that you can get to it downloaded files through iTunes File Sharing.
Comment on attachment 8588178 [details] [review]

Working pretty well now. Updated snackbars to behave a little more like Android super toasts (button on the right) when there's only one button. Also using constraints better so the animations are smoother.
Attachment #8588178 - Flags: review?(sarentz)
Comment on attachment 8588178 [details] [review]

Wes can you please rebase this one before I look at it?
Weird, the commits in this PR make no sense. Can you double check if this PR is correct?
Grr. I rebased but then used commit --ammend which shoved my patch on top of head. I split things out a lot more here. My git patch-splitting skills are still... growing, so I see a few things still in the wrong place here (DownloadManager.swift is added to the project in the progress bar patch for example), and a few things that could be split up more. Hopefully its more readable though...
I added in a beginBackgroundTask request commit here as well. That should keep us alive in the background for a bit longer (until the download is finished).
Flags: needinfo?(sarentz)
Also, I should note that these downloads are stored in a different place than our normal profile. Our normal profile isn't easily exposed in iTunes as downloadable (not to say there aren't other things that will back it up or expose it, but it doesn't show up here).

I think I need to move these to a special "Downloads" folder so that its easy to cleanup/delete-them-all at times though.
Talked to mfinkle about this a bit (and general worry about a new feature being added). If we punt on this, I think we at least need to show something on these types of links. An error page or a snackbar to say "Can't open this".
Whiteboard: drop?
tracking-fennec: + → -
Clearing needinfo because we are moving this to v1.1.
Comment on attachment 8588178 [details] [review]

Clearing review request because we are moving this to v1.1.
Flags: needinfo?(sarentz)
Attachment #8588178 - Flags: review?(sarentz)
Visit (Content-Type: application/zip), we open the zip in the browser, potentially blowing bandwidth on a larger file for example. Expected to see an error if we won't hand off like Safari; please investigate bug 1159380 for 1.0
"Open in Safari" does not work
Because we have a string ".... we're working on it".
tracking-fennec: ? → ---
tracking-fxios: --- → ?
Let's create a feature card and add to our roadmap for future planning
Hardware: ARM → All
Rank: 5
You need to log in before you can comment on or make changes to this bug.