[GUIDE] Downloading Image, PDF and Music files in Android WebView apps πŸ“²

Want to use WebView to save PDF and image files to your users phone or tablet? This is the way to do it:


  • Download the WebViewGold template for Android StudioΒ here.
    orΒ book our full all-inclusive WeSetupYourWebViewApp service.
  • Save PDF files by calling links with .pdf suffix:
        <a href="http://www.example.org/file.pdf">Link</a>
  • Save images to the camera roll of the user by running this script on your website:
        var imgurl = "https://www.example.org/example.png"; //Image URL
        window.location.href = "savethisimage://?url="+ imgurl +"";
  • Save Music files by calling links with .mp3, .mp4 or .wav suffix:
  • <a href="http://www.example.org/file.mp3">Link mp3</a>
    <a href="http://www.example.org/file.mp4">Link mp4</a>
    <a href="http://www.example.org/file.wav">Link wav</a>

Done, that’s it! πŸ˜‰ Happy coding!