Hi  Urs,

On Mon, Mar 2, 2020 at 8:24 AM Urs Riggenbach <
urs.riggenbach.ph...@gmail.com> wrote:

> Is it possible to handle the downloads in the app and get access to the
> downloadable file for upload?
>
> Does GeckoView provide some kind of Listener for downloads?
>

For downloads you can implement `onExternalResponse()`[1] in the
`ContentDelegate`. The `WebResponseInfo` passed has some metadata including
the url. You can then download the file with `GeckoWebExecutor` or another
http stack. Eventually this API will return a `WebResponse` directly, but
we don't have that yet.

[1]
https://mozilla.github.io/geckoview/javadoc/mozilla-central/org/mozilla/geckoview/GeckoSession.ContentDelegate.html#onExternalResponse-org.mozilla.geckoview.GeckoSession-org.mozilla.geckoview.GeckoSession.WebResponseInfo-
_______________________________________________
mobile-firefox-dev mailing list
mobile-firefox-dev@mozilla.org
https://mail.mozilla.org/listinfo/mobile-firefox-dev

Reply via email to