Тёмный

Enable downloading in your web browser/web view in sketchware| Lighting Knowledge| 

Lighting Knowledge
Подписаться 423
Просмотров 10 тыс.
50% 1

Hello friends today I am going to show you how to enable downloading in your web browser. Only follow the instructions.
Add source directory code👇👇👇
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() + "/Webview/Download");if(!aatv.exists()){if (!aatv.mkdirs()){ Log.e("TravellerLog ::","Problem creating Image folder");}} request.setDestinationInExternalPublicDir("/Webview/Download", URLUtil.guessFileName(url, contentDisposition, mimetype));
DownloadManager manager = (DownloadManager) getSystemService(Context.DOWNLOAD_SERVICE);
manager.enqueue(request);
showMessage("Downloading File....");
BroadcastReceiver onComplete = new BroadcastReceiver() {
public void onReceive(Context ctxt, Intent intent) {
showMessage("Download Complete!");
unregisterReceiver(this);
}};
registerReceiver(onComplete, new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE));
}
});
Thanks for watching 🙏🙏🙏🙏

Опубликовано:

 

22 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 23   
@lightingknowledge3782
@lightingknowledge3782 3 года назад
Code link:docs.google.com/document/d/1zg8AG1aKvNYOFu0f6Hyv2BTGbGRRhqp90Jtw3My-NeY/edit?usp=drivesdk
@amiraliazimi6091
@amiraliazimi6091 3 года назад
Tanck you
@amiraliazimi6091
@amiraliazimi6091 3 года назад
Photo cannot be downloaded What should I do to get the photo downloaded?
@amiraliazimi6091
@amiraliazimi6091 3 года назад
Can you answer this?
@user-kz7my4ku5c
@user-kz7my4ku5c 2 года назад
Android 11 api 30 then download not working
@SheenDelute81689
@SheenDelute81689 5 месяцев назад
the app resource swb project i needed bro❤
@viewer75599
@viewer75599 3 года назад
Make a tutorial for enable upload in webview.
@akandroidgaming4745
@akandroidgaming4745 4 года назад
Good
@mattia097
@mattia097 2 года назад
THANK YOU SO MUCH!!! Your tutorial is perfect!
@fujelraza489
@fujelraza489 3 года назад
Worked fine but file ia downloading in php format
@FerdySahputera
@FerdySahputera 3 года назад
thank work sir
@onlineobservations
@onlineobservations 2 года назад
Thank You Very Much ! It's Work
@CargoBlitz
@CargoBlitz 3 года назад
Thanks
@rajamoulikankati4988
@rajamoulikankati4988 2 года назад
Thank Bro
@atailhankokturk3086
@atailhankokturk3086 4 года назад
Thx
@AhmetErkam
@AhmetErkam 3 года назад
Works fine. Thank you!
@user-kz7my4ku5c
@user-kz7my4ku5c 2 года назад
Android 11 api 30 then not working
@mohamed1nounou806
@mohamed1nounou806 3 года назад
A code or block to change the background color of the web view, thank you
@amiraliazimi6091
@amiraliazimi6091 3 года назад
Hello, can you send that code here? I can not copy And I kind of copied it now, but it was copied wrong And error
@lightingknowledge3782
@lightingknowledge3782 3 года назад
Please visit the discription for the code.
@lightingknowledge3782
@lightingknowledge3782 3 года назад
I have aslo pinned the link in the comment box. Thanks for your comment.
@amiraliazimi6091
@amiraliazimi6091 3 года назад
Does anyone know why he is making a mistake for me?
Далее
«По каверочку» х МУЗЛОФТ❤️
00:21
Direct Download Buttom in sketchware
6:23
Просмотров 15 тыс.
Enable upload from webview in Sketchware
4:33
Просмотров 14 тыс.
How To Run HTML File In Sketchware Project?
4:11
Просмотров 2,3 тыс.
Webview custom error page using Sketchware
5:28
Просмотров 12 тыс.
Downloading files using webview in Sketchware
6:36
Просмотров 1,4 тыс.
Android Download File from WebView using Kotlin
11:56
Просмотров 4,7 тыс.