This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mWebContents.setDownloadListener(new DownloadListener() { | |
@Override | |
public void onDownloadStart(String url, String userAgent, String contentDisposition, String mimeType, long contentLength) { | |
try { | |
DownloadManager.Request request = new DownloadManager.Request(Uri.parse(url)); | |
request.setMimeType(mimeType); | |
request.addRequestHeader("User-Agent", userAgent); | |
request.setDescription("Downloading file"); |