API for Image / File Saving

  1. 2 years ago

    Hi,

    You can't save any image (or file) generated by your App ("can only download http/https uris...").

    I understand this is a WebView limitation, but perhaps you can implement it on the JavaScript API ?

    You already have Website2APK.printPage(); that generates a PDF....
    How about Website2APK.saveImage(); that creates a PNG ?

    Thanks!

  2. admin

    24 Sep 2019 Administrator

    Actually it does not support blob:// URLs. All other direct link download format works.

  3. 2 months ago
    Edited 2 months ago by JOHNNY inside

    Oops! Help needed!

    I have a Javascript library which creates and saves QR codes. It worked like a charm on the browser but now that I am compiling everything in an offline app, there's no way I can save the QR image. I get the same error described by Ricardo Nuñez before. I get the alert:

    Can only download HTTP/HTTPS URIs, followed by the image internal code.

    Already turned on all possible rights for the app and still getting the same problem. As stated, it should be related to the restrictions that since API 28 have all those files using the protocol file://. Ok, that's the problem, but... which is the solution? Could anyone help me out with it?

    I've read that it could be solved:

    https://stackoverflow.com/questions/26379174/download-images-using-android-webview

    Another sample:
    https://android--examples.blogspot.com/2017/10/android-save-image-from-webview.html

    Even this could help:
    https://stackoverflow.com/questions/48892390/download-blob-file-from-website-inside-android-webviewclient/48954970#48954970

    Is that something that could be done in a quick update? I am literally on stand-by waiting for this to release a new feature in my app. Please, give it a shot.

 

or Sign Up to reply!