Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Implement Gecko-based DownloadManager #1968

Closed
pocmo opened this issue Feb 6, 2019 · 10 comments
Closed

Implement Gecko-based DownloadManager #1968

pocmo opened this issue Feb 6, 2019 · 10 comments
Assignees
Labels
<download> Component: feature-download 🌟 feature New functionality and improvements needs:gv To implement/fix this we need a new API in GeckoView P1

Comments

@pocmo
Copy link
Contributor

pocmo commented Feb 6, 2019

We want:

Soon we are going to have:

Rough outline of work required:

  • Exposing the stream in Download:

  • Write a custom DownloadManager to be used by feature-downloads

    • On-going downloads need to be passed to a background service (with an on-going notification)
    • The download manager needs to retry downloads if they fail
    • We probably want to expose some controls in the notification (abort? pause?)
    • The download manager needs to have some kind of API that apps can use to get and list downloads and their state in the UI
    • Optionally pass off completed downloads to Androids Download Manager? Just so that they show up in the "Downloads" app?
    • Have a way to notify the app about completed downloads (Andorid's Download Manager sends a broadcast, I think)

┆Issue is synchronized with this Jira Task

@pocmo pocmo added 🌟 feature New functionality and improvements <download> Component: feature-download labels Feb 6, 2019
@vesta0 vesta0 added the needs:gv To implement/fix this we need a new API in GeckoView label Feb 11, 2019
@csadilek csadilek self-assigned this Feb 19, 2019
@csadilek csadilek removed their assignment Mar 4, 2019
@vesta0
Copy link
Collaborator

vesta0 commented Jun 6, 2019

Now that we have the GV APIs, would be great to have an idea of the size of this work.

The goal is to oerform Downloads through GeckoView so we can get support for Cookies and allow for protected downloads (e.g. Bank statements).

@vesta0 vesta0 added the P1 label Jun 6, 2019
@pocmo pocmo added the L label Jun 7, 2019
@pocmo
Copy link
Contributor Author

pocmo commented Jun 7, 2019

With our current sizing definitely an L.

This can vary in scope depending on how far we want to go on a "it works" to "deluxe solution" scale. For example:

  • In this version, do we also want to store data about performed downloads so that Fenix can expose that in its library or do we just hand of completed downloads to Android's download manager to display it there?
  • In this version, do we want to support retrying failed downloads?
  • In this version, do we want to support pausing downloads?
    -> TL;DR: Do we just try to download once via Gecko(View) or do we need to store meta data about the download to support UI and actions like retry.

@NotWoods
Copy link
Contributor

NotWoods commented Jun 7, 2019

Currently this is blocked on a GV API: Bug 1530022

@pocmo
Copy link
Contributor Author

pocmo commented Jun 7, 2019

@NotWoods This is the deluxe version where we take over a download from GeckoView. Right now we could still implement this by issuing a new request via concept-fetch. At the time of calling that delegate Gecko(view) has already cancelled the its own download progress.

@pocmo
Copy link
Contributor Author

pocmo commented Jun 7, 2019

(The same we would need to do when re-trying)

NotWoods added a commit to NotWoods/android-components that referenced this issue Jun 7, 2019
@vesta0
Copy link
Collaborator

vesta0 commented Jun 7, 2019

@pocmo

In this version, do we also want to store data about performed downloads so that Fenix can expose that in its library or do we just hand of completed downloads to Android's download manager to display it there?

  • This is a post-mvp feature so ideally we want to go with the deluxe solution but considering other priorities maybe we can break it into steps? First step: just hand completed downloads to Anrdoid's download manager.

In this version, do we want to support retrying failed downloads?

-No but let's track it as a separate issue under the Download meta.

In this version, do we want to support pausing downloads?
-> TL;DR: Do we just try to download once via Gecko(View) or do we need to store meta data about the download to support UI and actions like retry.

-No but let's track it as a separate issue under the Download meta.

NotWoods added a commit to NotWoods/android-components that referenced this issue Jun 7, 2019
NotWoods added a commit to NotWoods/android-components that referenced this issue Jun 14, 2019
NotWoods added a commit to NotWoods/android-components that referenced this issue Jun 25, 2019
NotWoods added a commit to NotWoods/android-components that referenced this issue Jun 25, 2019
NotWoods added a commit to NotWoods/android-components that referenced this issue Jun 25, 2019
@NotWoods NotWoods closed this as completed Jul 8, 2019
@cpeterso
Copy link
Contributor

cpeterso commented Jul 8, 2019

@NotWoods - Do you still need GV to pass the WebResponse to ContentDelegate.onExternalResponse? This is GV bug https://bugzilla.mozilla.org/show_bug.cgi?id=1530022.

@NotWoods
Copy link
Contributor

NotWoods commented Jul 8, 2019

As snorp said, it's good enough for now to make a second request to Gecko. Having access to the WebResponse lets us make a single request down the line.

@pocmo pocmo added this to the 3.0.0 🏴‍☠️ milestone Jul 9, 2019
@pocmo
Copy link
Contributor Author

pocmo commented Jul 9, 2019

Let's file AC follow-ups though (if we haven't already?):

  • Using WebResponse from ContentDelegate.onExternalResponse once available
  • Save download jobs persistent so that they can be exposed in the browser UI, and retried etc.

mozilla-l10n-automation-bot pushed a commit to mozilla-l10n-automation-bot/android-l10n that referenced this issue Oct 24, 2022
…DownloadManager

X-Channel-Revision: [main] mozilla-mobile/android-components@cf522a7
X-Channel-Revision: [main] mozilla-mobile/fenix@20b25d7
X-Channel-Revision: [main] mozilla-mobile/focus-android@29486b8
X-Channel-Converted-Revision: [ac-prep] mozilla-mobile/firefox-android@0ef484b
mozilla-l10n-automation-bot pushed a commit to mozilla-l10n-automation-bot/android-l10n that referenced this issue Oct 24, 2022
…DownloadManager

X-Channel-Revision: [main] mozilla-mobile/android-components@cf522a7
X-Channel-Revision: [main] mozilla-mobile/fenix@20b25d7
X-Channel-Revision: [main] mozilla-mobile/focus-android@29486b8
X-Channel-Converted-Revision: [ac-prep] mozilla-mobile/firefox-android@0ef484b
JohanLorenzo pushed a commit to JohanLorenzo/android-l10n that referenced this issue Oct 25, 2022
…DownloadManager

X-Channel-Revision: [main] mozilla-mobile/android-components@cf522a7
X-Channel-Revision: [main] mozilla-mobile/fenix@20b25d7
X-Channel-Revision: [main] mozilla-mobile/focus-android@29486b8
X-Channel-Converted-Revision: [ac-prep] mozilla-mobile/firefox-android@0ef484b
JohanLorenzo pushed a commit to JohanLorenzo/android-l10n that referenced this issue Oct 25, 2022
…DownloadManager

X-Channel-Revision: [main] mozilla-mobile/android-components@cf522a7
X-Channel-Revision: [main] mozilla-mobile/fenix@20b25d7
X-Channel-Revision: [main] mozilla-mobile/focus-android@29486b8
X-Channel-Converted-Revision: [ac-prep] mozilla-mobile/firefox-android@0ef484b
JohanLorenzo pushed a commit to JohanLorenzo/android-l10n that referenced this issue Oct 25, 2022
…DownloadManager

X-Channel-Revision: [main] mozilla-mobile/android-components@cf522a7
X-Channel-Revision: [main] mozilla-mobile/fenix@20b25d7
X-Channel-Revision: [main] mozilla-mobile/focus-android@29486b8
X-Channel-Converted-Revision: [ac-prep] mozilla-mobile/firefox-android@0ef484b
JohanLorenzo pushed a commit to JohanLorenzo/android-l10n that referenced this issue Oct 25, 2022
…DownloadManager

X-Channel-Revision: [main] mozilla-mobile/android-components@cf522a7
X-Channel-Revision: [main] mozilla-mobile/fenix@20b25d7
X-Channel-Revision: [main] mozilla-mobile/focus-android@29486b8
X-Channel-Converted-Revision: [ac-prep] mozilla-mobile/firefox-android@0ef484b
mozilla-l10n-automation-bot pushed a commit to mozilla-l10n-automation-bot/android-l10n that referenced this issue Oct 25, 2022
…DownloadManager

X-Channel-Revision: [main] mozilla-mobile/android-components@cf522a7
X-Channel-Revision: [main] mozilla-mobile/fenix@20b25d7
X-Channel-Revision: [main] mozilla-mobile/focus-android@29486b8
X-Channel-Converted-Revision: [ac-prep] mozilla-mobile/firefox-android@0ef484b
mozilla-l10n-automation-bot pushed a commit to mozilla-l10n-automation-bot/android-l10n that referenced this issue Oct 26, 2022
…DownloadManager

X-Channel-Revision: [main] mozilla-mobile/android-components@cf522a7
X-Channel-Revision: [main] mozilla-mobile/fenix@20b25d7
X-Channel-Revision: [main] mozilla-mobile/focus-android@29486b8
X-Channel-Converted-Revision: [ac-prep] mozilla-mobile/firefox-android@0ef484b
mozilla-l10n-automation-bot pushed a commit to mozilla-l10n-automation-bot/android-l10n that referenced this issue Oct 27, 2022
…DownloadManager

X-Channel-Revision: [main] mozilla-mobile/android-components@cf522a7
X-Channel-Revision: [main] mozilla-mobile/fenix@20b25d7
X-Channel-Revision: [main] mozilla-mobile/focus-android@29486b8
X-Channel-Converted-Revision: [ac-prep] mozilla-mobile/firefox-android@0ef484b
mozilla-l10n-automation-bot pushed a commit to mozilla-l10n-automation-bot/android-l10n that referenced this issue Oct 27, 2022
…DownloadManager

X-Channel-Revision: [main] mozilla-mobile/android-components@cf522a7
X-Channel-Revision: [main] mozilla-mobile/fenix@20b25d7
X-Channel-Revision: [main] mozilla-mobile/focus-android@29486b8
X-Channel-Converted-Revision: [ac-prep] mozilla-mobile/firefox-android@0ef484b
mozilla-l10n-automation-bot pushed a commit to mozilla-l10n-automation-bot/android-l10n that referenced this issue Oct 27, 2022
…DownloadManager

X-Channel-Revision: [main] mozilla-mobile/android-components@cf522a7
X-Channel-Revision: [main] mozilla-mobile/fenix@20b25d7
X-Channel-Revision: [main] mozilla-mobile/focus-android@29486b8
X-Channel-Converted-Revision: [ac-prep] mozilla-mobile/firefox-android@0ef484b
mozilla-l10n-automation-bot pushed a commit to mozilla-l10n-automation-bot/android-l10n that referenced this issue Oct 27, 2022
…DownloadManager

X-Channel-Revision: [main] mozilla-mobile/android-components@cf522a7
X-Channel-Revision: [main] mozilla-mobile/fenix@20b25d7
X-Channel-Revision: [main] mozilla-mobile/focus-android@29486b8
X-Channel-Converted-Revision: [ac-prep] mozilla-mobile/firefox-android@0ef484b
mozilla-l10n-automation-bot pushed a commit to mozilla-l10n-automation-bot/android-l10n that referenced this issue Oct 28, 2022
…DownloadManager

X-Channel-Revision: [main] mozilla-mobile/android-components@cf522a7
X-Channel-Revision: [main] mozilla-mobile/fenix@20b25d7
X-Channel-Revision: [main] mozilla-mobile/focus-android@29486b8
X-Channel-Converted-Revision: [ac-prep] mozilla-mobile/firefox-android@0ef484b
mozilla-l10n-automation-bot pushed a commit to mozilla-l10n-automation-bot/android-l10n that referenced this issue Oct 28, 2022
…DownloadManager

X-Channel-Revision: [main] mozilla-mobile/android-components@cf522a7
X-Channel-Revision: [main] mozilla-mobile/fenix@20b25d7
X-Channel-Revision: [main] mozilla-mobile/focus-android@29486b8
X-Channel-Converted-Revision: [ac-prep] mozilla-mobile/firefox-android@0ef484b
mozilla-l10n-automation-bot pushed a commit to mozilla-l10n-automation-bot/android-l10n that referenced this issue Oct 28, 2022
…DownloadManager

X-Channel-Revision: [main] mozilla-mobile/android-components@cf522a7
X-Channel-Revision: [main] mozilla-mobile/fenix@20b25d7
X-Channel-Revision: [main] mozilla-mobile/focus-android@29486b8
X-Channel-Converted-Revision: [ac-prep] mozilla-mobile/firefox-android@0ef484b
mozilla-l10n-automation-bot pushed a commit to mozilla-l10n-automation-bot/android-l10n that referenced this issue Oct 29, 2022
…DownloadManager

X-Channel-Revision: [main] mozilla-mobile/android-components@cf522a7
X-Channel-Revision: [main] mozilla-mobile/fenix@20b25d7
X-Channel-Revision: [main] mozilla-mobile/focus-android@29486b8
X-Channel-Converted-Revision: [ac-prep] mozilla-mobile/firefox-android@0ef484b
mozilla-l10n-automation-bot pushed a commit to mozilla-l10n-automation-bot/android-l10n that referenced this issue Oct 30, 2022
…DownloadManager

X-Channel-Revision: [main] mozilla-mobile/android-components@cf522a7
X-Channel-Revision: [main] mozilla-mobile/fenix@20b25d7
X-Channel-Revision: [main] mozilla-mobile/focus-android@29486b8
X-Channel-Converted-Revision: [ac-prep] mozilla-mobile/firefox-android@0ef484b
mozilla-l10n-automation-bot pushed a commit to mozilla-l10n-automation-bot/android-l10n that referenced this issue Oct 30, 2022
…DownloadManager

X-Channel-Revision: [main] mozilla-mobile/android-components@cf522a7
X-Channel-Revision: [main] mozilla-mobile/fenix@20b25d7
X-Channel-Revision: [main] mozilla-mobile/focus-android@29486b8
X-Channel-Converted-Revision: [ac-prep] mozilla-mobile/firefox-android@0ef484b
mozilla-l10n-automation-bot pushed a commit to mozilla-l10n-automation-bot/android-l10n that referenced this issue Oct 31, 2022
…DownloadManager

X-Channel-Revision: [main] mozilla-mobile/android-components@cf522a7
X-Channel-Revision: [main] mozilla-mobile/fenix@20b25d7
X-Channel-Revision: [main] mozilla-mobile/focus-android@29486b8
X-Channel-Converted-Revision: [ac-prep] mozilla-mobile/firefox-android@0ef484b
mozilla-l10n-automation-bot pushed a commit to mozilla-l10n-automation-bot/android-l10n that referenced this issue Oct 31, 2022
…DownloadManager

X-Channel-Revision: [main] mozilla-mobile/android-components@cf522a7
X-Channel-Revision: [main] mozilla-mobile/fenix@20b25d7
X-Channel-Revision: [main] mozilla-mobile/focus-android@29486b8
X-Channel-Converted-Revision: [ac-prep] mozilla-mobile/firefox-android@0ef484b
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
<download> Component: feature-download 🌟 feature New functionality and improvements needs:gv To implement/fix this we need a new API in GeckoView P1
Projects
None yet
Development

No branches or pull requests

5 participants