Android Question Save the picture in the page displayed in the webview ?

KIM jihoon

Member
Licensed User
Longtime User
3 photos (images) are displayed on the webview page
I want to save the displayed 3 images (PNG) to my phone

thanks for the help
 

KIM jihoon

Member
Licensed User
Longtime User
Thanks for the OkHttpUtils2 answer

OkHttpUtils2 download is in use
But I'm looking for a way to quickly download more than 50 images.

The pc browser saves the image file in the page.
I want to implement this method in my app
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
I want to implement this method in my app
Use okhttputils2 to download 50 images then. The PC Browser already have downloaded them to be able to save it to disc.
 
Upvote 0

KIM jihoon

Member
Licensed User
Longtime User
Use okhttputils2 to download 50 images then. The PC Browser already have downloaded them to be able to save it to disc.
Is there a way to read the file saved by the browser (webview) from the app?
I think it is faster to read the saved file from the browser than the OkHttpUtils2 download method.
Will my thoughts be a good solution?
 
Last edited:
Upvote 0

drgottjr

Expert
Licensed User
Longtime User
risen from the dead! i posted this:

https://www.b4x.com/android/forum/threads/webview-right-click-to-save-image.124054/#content
2 years ago.

i just tested it a little, seems to work still. there is no "right click" for webview, so i use "long click".
it should work with most image links. tap and hold your finger over an image and save it to your
device. you can choose to save the image to safedirexternal or to the pictures gallery.

note: i'm seeing a lot of .webp images lately. they'll be saved as such.
note II: images in a webview or in a browser are not always linkable (that is, downloadable). i don't
know how your use case will play out.
note III: you can ignore the warning about the external directory. an earlier version of the library
might have saved images to dir.external.
note IV: it's 2 years old. if it serves your purpose, great. if not, you can post what the problem might
be, but no guarantees as to what i can do.
note V: it's possible the ultimatewebview library offers such functionality. you might want to try it.
it's maintained.
 

Attachments

  • contextual.jar
    17.7 KB · Views: 174
  • contextual.xml
    2.1 KB · Views: 154
Upvote 0
Top