UIParent.IsSystemWebviewAvailable Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Caution
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);