다음을 통해 공유


UIParent.IsSystemWebviewAvailable Method

Definition

Checks Android device for chrome packages. Returns true if chrome package for launching system webview is enabled on device. Returns false if chrome package is not found.

[System.Obsolete("See https://aka.ms/msal-net-3-breaking-changes. ", true)]
public static bool IsSystemWebviewAvailable ();
[<System.Obsolete("See https://aka.ms/msal-net-3-breaking-changes. ", true)>]
static member IsSystemWebviewAvailable : unit -> bool
Public Shared Function IsSystemWebviewAvailable () As Boolean

Returns

Attributes

Examples

The following code decides, in a Xamarin.Forms app, which browser to use based on the presence of the required packages.

bool useSystemBrowser = UIParent.IsSystemWebviewAvailable();
App.UIParent = new UIParent(Xamarin.Forms.Forms.Context as Activity, !useSystemBrowser);

Applies to