Webview Downloader
mWebView.setDownloadListener(new DownloadListener(){
public void onDownloadStart(String s,String s1,String s2,String s3,long s4){
//တိုက်ရိုက် download ဆွဲဖို့
Request request = new Request(Uri.parse(s));
request.allowScanningByMediaScanner();
request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS,"ProgressBarProject");
DownloadManager dm = (DownloadManager) getSystemService(DOWNLOAD_SERVICE);
dm.enqueue(request);
//Browser တစ်ခုခုကနေ download ဆွဲဖို့
/*Intent intent=new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(s));
startActivity(intent);*/
}
public void onDownloadStart(String s,String s1,String s2,String s3,long s4){
//တိုက်ရိုက် download ဆွဲဖို့
Request request = new Request(Uri.parse(s));
request.allowScanningByMediaScanner();
request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS,"ProgressBarProject");
DownloadManager dm = (DownloadManager) getSystemService(DOWNLOAD_SERVICE);
dm.enqueue(request);
//Browser တစ်ခုခုကနေ download ဆွဲဖို့
/*Intent intent=new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(s));
startActivity(intent);*/
}