WebViewClient.OnRenderProcessGone(WebView, RenderProcessGoneDetail) Method

Definition

Notify host application that the given WebView's render process has exited.

[Android.Runtime.Register("onRenderProcessGone", "(Landroid/webkit/WebView;Landroid/webkit/RenderProcessGoneDetail;)Z", "GetOnRenderProcessGone_Landroid_webkit_WebView_Landroid_webkit_RenderProcessGoneDetail_Handler", ApiSince=26)]
public virtual bool OnRenderProcessGone (Android.Webkit.WebView? view, Android.Webkit.RenderProcessGoneDetail? detail);
[<Android.Runtime.Register("onRenderProcessGone", "(Landroid/webkit/WebView;Landroid/webkit/RenderProcessGoneDetail;)Z", "GetOnRenderProcessGone_Landroid_webkit_WebView_Landroid_webkit_RenderProcessGoneDetail_Handler", ApiSince=26)>]
abstract member OnRenderProcessGone : Android.Webkit.WebView * Android.Webkit.RenderProcessGoneDetail -> bool
override this.OnRenderProcessGone : Android.Webkit.WebView * Android.Webkit.RenderProcessGoneDetail -> bool

Parameters

view
WebView

The WebView which needs to be cleaned up.

detail
RenderProcessGoneDetail

the reason why it exited.

Returns

true if the host application handled the situation that process has exited, otherwise, application will crash if render process crashed, or be killed if render process was killed by the system.

Attributes

Remarks

Notify host application that the given WebView's render process has exited.

Multiple WebView instances may be associated with a single render process; onRenderProcessGone will be called for each WebView that was affected. The application's implementation of this callback should only attempt to clean up the specific WebView given as a parameter, and should not assume that other WebView instances are affected.

The given WebView can't be used, and should be removed from the view hierarchy, all references to it should be cleaned up, e.g any references in the Activity or other classes saved using android.view.View#findViewById and similar calls, etc.

To cause an render process crash for test purpose, the application can call loadUrl("chrome://crash") on the WebView. Note that multiple WebView instances may be affected if they share a render process, not just the specific WebView which loaded chrome://crash.

Java documentation for android.webkit.WebViewClient.onRenderProcessGone(android.webkit.WebView, android.webkit.RenderProcessGoneDetail).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to