Reputation: 21
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 ?
Upvotes: 1
Views: 224
Reputation: 1892
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
Upvotes: 0
Reputation: 634
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);
}
});
Upvotes: 1