I have a webview in my Android Application. When user goes to webview and click a link to download a file nothing happens.
URL = "my url";
mWebView = (WebView) findViewById(R.id.webview);
mWebView.setWebViewClient(new HelloWebViewClient());
mWebView.getSettings().setDefaultZoom(ZoomDensity.FAR);
mWebView.loadUrl(URL);
Log.v("TheURL", URL);
How to enable download inside a webview? If I disable webview and enable the intent to load the URL on browser from application then download works seamlessly.
String url = "my url";
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
startActivity(i);
Can someone help me out here? The page loads without issue but the link to a image file in the HTML page is not working...
Try this out. After going through a lot of posts and forums, I found this.
Do not forget to give this permission! This is very important! Add this in your Manifest file(The AndroidManifest.xml file)
Hope this helps. Cheers :)
Try using download manager, which can help you download everything you want and save you time.
Check those to options:
Option 1 ->
Option 2 ->
Have you tried?