Android Question webview can not capture bitmap

wy328

Member
Licensed User
Longtime User
WebView method CaptureBitmap seems to work very unstable on html loaded page?
Here's my code, I just have one time got the file correctly, other times, it give me a broken file:
vWeb.LoadHtml(webContent)
...
vWeb.CaptureBitmap.WriteToStream(File.OpenOutput(File.DirInternalCache, "share.png", False), 100, "PNG")

could anyone help? thanks!
 

wy328

Member
Licensed User
Longtime User
Are you making sure the WebView loads completely?, place the save to bitmap code in the PageFinished event.
yes i did, I even added a timer to do a try catch loop, no error message, and no bitmap file...I will try more and post the code here when I back home. thanks!
 
Upvote 0
Top