Hello everyone Iam new in android development i want to download an pdf file in my app webView I use this below code but when I try to open this the app redirect me to the my phone web browser how can i solve it and how can I download the pdf file in my webView
webView.loadUrl("https://drive.google.com/file/d/0B8q0tdiHCaVUc3RhcnRlcl9maWxl/view")
webView.setDownloadListener { url, userAgent, contentDisposition, mimetype, contentLength ->
val i = Intent(Intent.ACTION_VIEW)
i.data = Uri.parse(url)
startActivity(i)
}