MitchBu Well-Known Member Licensed User Longtime User Oct 24, 2020 #1 Here is the code I am trying to use. I never get any file. WVLetter is the WebView. B4X: Copy 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
Here is the code I am trying to use. I never get any file. WVLetter is the WebView. B4X: Copy 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 Oct 24, 2020 #2 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
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.
Erel B4X founder Staff member Licensed User Longtime User Oct 25, 2020 #3 True, you should never see File.DirDefaultExternal. Best to use File.DirInternal Second best RuntimePermissions.GetSafeDirDefaultExternal (same folder as File.DirDefaultExternal). Upvote 0
True, you should never see File.DirDefaultExternal. Best to use File.DirInternal Second best RuntimePermissions.GetSafeDirDefaultExternal (same folder as File.DirDefaultExternal).