Interface CefriumBrowser.CefriumDownloadHandler

Enclosing class:
CefriumBrowser

public static interface CefriumBrowser.CefriumDownloadHandler
Richer download handler that can allow/deny a download before it starts and cancel/pause/resume one in progress. Prefer this over CefriumBrowser.OnDownloadListener (which is detect-only and kept for compatibility). Mirrors CEF's CefDownloadHandler.

Callbacks arrive on the browser's UI thread.

  • Method Details

    • onBeforeDownload

      A download is about to start. Decide asynchronously whether to allow it -- call callback.allow(path) to download (pass null to use the suggested path) or callback.cancel() to block it (e.g. after an accidental click). The download does not begin until one of the two is called; you may show a dialog first.
    • onDownloadUpdated

      void onDownloadUpdated(CefriumBrowser.DownloadItem item)
      Progress update for an in-flight download. Use CefriumBrowser.DownloadItem's cancel() / pause() / resume() to control it.