Sdílet prostřednictvím


WebView.DisableWebView Method

Definition

Indicate that the current process does not intend to use WebView, and that an exception should be thrown if a WebView is created or any other methods in the android.

[Android.Runtime.Register("disableWebView", "()V", "", ApiSince=28)]
public static void DisableWebView ();
[<Android.Runtime.Register("disableWebView", "()V", "", ApiSince=28)>]
static member DisableWebView : unit -> unit
Attributes

Remarks

Indicate that the current process does not intend to use WebView, and that an exception should be thrown if a WebView is created or any other methods in the android.webkit package are used.

Applications with multiple processes may wish to call this in processes that are not intended to use WebView to avoid accidentally incurring the memory usage of initializing WebView in long-lived processes that have no need for it, and to prevent potential data directory conflicts (see #setDataDirectorySuffix).

For example, an audio player application with one process for its activities and another process for its playback service may wish to call this method in the playback service's android.app.Service#onCreate.

Java documentation for android.webkit.WebView.disableWebView().

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