In my website there are some downloadable contents. I have created a webview application out of that website using android studio. In my application when i click those downloadable contents nothing happens, it doesn't get downloaded. but if I use that website from moblile's browser it gets downloaded. Then What is the problem with my android application ?
Asked
Active
Viewed 87 times
1
-
`What is the problem with my android application` you likely did not implement download functionality. WebView can't download from scratch. – Vladyslav Matviienko Jun 01 '18 at 06:06
2 Answers
1
Have you tried this
mWebView.setDownloadListener(new DownloadListener() {
public void onDownloadStart(String url, String userAgent,
String contentDisposition, String mimetype,
long contentLength) {
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
startActivity(i);
}
});

Yogesh Choudhary Paliyal
- 604
- 1
- 8
- 23
-
hey my codes are in the following answer . Could you tell me where should I include your codes ? – Rizvan Rahman Jun 01 '18 at 06:45
-
add this under mWebView = (WebView)findViewById(R.id.webView); – Yogesh Choudhary Paliyal Jun 01 '18 at 06:46
0
Please Add this code to enable javascript in your webview. Because some javascript is not load in webview.
webView.getSettings().setDomStorageEnabled(true);
For more details follow below link
Hope this will be help you

Shivam Kumar
- 1,892
- 2
- 21
- 33