From 764fd6edd035add549787061ebc788737883dc62 Mon Sep 17 00:00:00 2001 From: Juliano Bazzi Date: Wed, 24 Feb 2021 13:21:02 -0400 Subject: [PATCH] Android WebView Bug On some phones with Android 10, depending on the version of WebView, the page saved on the device is completely blank, as there was no time to load the HTML. It is a bug in WebView, however with this change in the code I was able to solve the problem in the application I develop. --- Forms9Patch/Forms9Patch.Droid/Services/ToPngService.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Forms9Patch/Forms9Patch.Droid/Services/ToPngService.cs b/Forms9Patch/Forms9Patch.Droid/Services/ToPngService.cs index 97058e97..0d580d83 100644 --- a/Forms9Patch/Forms9Patch.Droid/Services/ToPngService.cs +++ b/Forms9Patch/Forms9Patch.Droid/Services/ToPngService.cs @@ -318,6 +318,7 @@ public override bool OnRenderProcessGone(Android.Webkit.WebView view, RenderProc public override void OnLoadResource(Android.Webkit.WebView view, string url) { System.Diagnostics.Debug.WriteLine("WebViewCallBack" + P42.Utils.ReflectionExtensions.CallerString() + ": "); + Task.Delay(1000).Wait(); base.OnLoadResource(view, url); Device.StartTimer(TimeSpan.FromSeconds(10), () => {