I would like to add download functionality to my webview browser. if the url contains ".mp3", I want the file to be downloaded just the way any regular browser does it. I found this code on stackoverflow but I'm not sure how to apply it. It might help you.
--------------------------------------------------------------------------------------
if([login to view URL]().contains(".mp3") {
Request request = new Request(
[login to view URL](url));
[login to view URL]();
[login to view URL](DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
[login to view URL](Environment.DIRECTORY_DOWNLOADS, "download");
// You can change the name of the downloads, by changing "download" to everything you want, such as the mWebview title...
DownloadManager dm = (DownloadManager) getSystemService(DOWNLOAD_SERVICE);
[login to view URL](request);
}
--------------------------------------------------------------------------------------
Please help.
Hi
I can do work on your android app . You can check my existing apps at
[login to view URL]
[login to view URL]
Please consider me for this work
Thanks
$29 USD en 1 día
4,9 (7 comentarios)
3,5
3,5
8 freelancers están ofertando un promedio de $22 USD por este trabajo