Launcher.CanOpenAsync Method

Definition

Overloads

CanOpenAsync(String)

Queries if the device supports opening the given URI scheme.

CanOpenAsync(Uri)

Queries if the device supports opening the given URI scheme.

CanOpenAsync(String)

Source:
Launcher.shared.cs
Source:
Launcher.shared.cs

Queries if the device supports opening the given URI scheme.

C#
public static System.Threading.Tasks.Task<bool> CanOpenAsync (string uri);

Parameters

uri
String

URI scheme to query.

Returns

true if opening is supported, otherwise false.

Exceptions

Thrown when uri is malformed.

Remarks

May throw System.UriFormatException if uri is malformed

Applies to

.NET MAUI 9 and .NET MAUI 8
Product Versions
.NET MAUI 8, 9

CanOpenAsync(Uri)

Source:
Launcher.shared.cs
Source:
Launcher.shared.cs

Queries if the device supports opening the given URI scheme.

C#
public static System.Threading.Tasks.Task<bool> CanOpenAsync (Uri uri);

Parameters

uri
Uri

URI scheme to query.

Returns

true if opening is supported, otherwise false.

Exceptions

Thrown when uri is malformed.

Remarks

May throw System.UriFormatException if uri is malformed

Applies to

.NET MAUI 9 and .NET MAUI 8
Product Versions
.NET MAUI 8, 9