How To Download File to Sketchware Webview Website In Hindi - Sketchware Webview File Download

 



This video I am show you how can you Download File to Sketchware Webview Website In Hindi.watch this video full and implement this feature on your website app  Sketchware Webview File Download.



webview1.setDownloadListener(new DownloadListener() {
public void onDownloadStart(String url, String userAgent, String contentDisposition, String mimetype, long contentLength) {
DownloadManager.Request request = new DownloadManager.Request(Uri.parse(url));
String cookies = CookieManager.getInstance().getCookie(url);
request.addRequestHeader("cookie", cookies);
request.addRequestHeader("User-Agent", userAgent);
request.setDescription("Downloading file...");
request.setTitle(URLUtil.guessFileName(url, contentDisposition, mimetype));
request.allowScanningByMediaScanner(); request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);

java.io.File aatv = new java.io.File(Environment.getExternalStorageDirectory().getPath() + "codesinsourav");

if(!aatv.exists()){if (!aatv.mkdirs()){ Log.e("TravellerLog ::","Problem creating Image folder");}} request.setDestinationInExternalPublicDir(_path, URLUtil.guessFileName(url, contentDisposition, mimetype));

DownloadManager manager = (DownloadManager) getSystemService(Context.DOWNLOAD_SERVICE);
manager.enqueue(request);
showMessage("Downloading File....");
//Notif if success
BroadcastReceiver onComplete = new BroadcastReceiver() {
public void onReceive(Context ctxt, Intent intent) {
showMessage("Download Complete!");
unregisterReceiver(this);
}};
registerReceiver(onComplete, new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE));
}
});


"""""""""""""""""""""""""""""""""""""""

 Social midea links:

Facebook: https://m.facebook.com/fbinsourav

Facebook Page: https://m.facebook.com/Tech-In-Sourav-108919020702061

Twitter:  https://mobile.twitter.com/Sourav23778587

 Instagram: https://www.instagram.com/techinsourav

 YouTube: https://www.youtube.com/channel/UC5DTy9f9rG_T9ym_zhu9Glg?sub_confirmation=1

"""""""""""""""""""""""""""""""""""""""


1 Comments

  1. Yo... thanks man. but there is some errors when it's compiling 🤧.... what should I do ?

    ReplyDelete
Previous Post Next Post