Android Question Trying to save picture from WebView.

MitchBu

Well-Known Member
Licensed User
Longtime User
Here is the code I am trying to use. I never get any file.

WVLetter is the WebView.

B4X:
    Dim WVPic As Bitmap = WVLetter.CaptureBitmap
    Dim Out As OutputStream
    Out = File.OpenOutput(File.DirDefaultExternal, "TestHTMLPic.png", False)
    WVPic.WriteToStream(Out, 100, "PNG")
    Out.Close

What am I doing wrong ?

TIA
 

drgottjr

Expert
Licensed User
Longtime User
try to wean yourself from DirDefaultExternal; you're not going to like what android has planned for you. in any case, i have no problem with your code when i use DirInternal.
 
Upvote 0
Top