setDownloadListener
никогда не вызывается в приведенной ниже версии 5.0 , но оно работает на зефире и выше. Пожалуйста, дайте мне знать реальное решение и причину.
Заранее спасибо
try {
mWebView.setDownloadListener(new DownloadListener() {
@Override
public void onDownloadStart(String url, String userAgent, String contentDisposition, String mimetype, long contentLength) {
Log.e(TAG, "onDownloadStart: " + url);
PdfDownloadAsyncTask pdfDownloadAsyncTask = new PdfDownloadAsyncTask(PdfActivity.this);
pdfDownloadAsyncTask.execute(url, getApplicationContext().getFilesDir().getAbsolutePath());
tvTitle.setVisibility(View.GONE);
mWebView.setVisibility(View.GONE);
}
});
} catch (Exception e) {
Log.e(TAG, "onCreate: " + e.getMessage());
}