I am using the following code to download files in the web view:
@SuppressLint("InlinedApi")public void onDownloadStart(String url,String userAgent,String contentDisposition,String mimetype,long contentLength){
DownloadManager.Request request =new DownloadManager.Request(Uri.parse(url));
request.allowScanningByMediaScanner();final String filename =URLUtil.guessFileName(url, contentDisposition, mimetype);
request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, filename);
request.setDestinationInExternalPublicDir("/Download", filename);DownloadManager dm =(DownloadManager) getSystemService(DOWNLOAD_SERVICE);
dm.enqueue(request);Intent intent =new Intent(Intent.ACTION_OPEN_DOCUMENT);
intent.addCategory(Intent.CATEGORY_OPENABLE);
intent.setType("*/*");
Toast.makeText(getApplicationContext(),"Baixando",
Toast.LENGTH_LONG).show();}}); //
The same is working normally on Android 4.0 ICS, but on Android 6.0 nothing happens. In that case, what would it take to make downloads on Android 6.0?