Skip to main content

Open-WebUI-Functions is here! New Pipelines, Filters, and more. Learn more

.NET MAUI Launcher Deep Links

The .NET MAUI Launcher API opens URIs using the platform default handlers. On Android that means handing work to system apps such as the dialer, browser, email client, or any application that registered a custom scheme.

Learn more

Overview

  • Launch mail, phone, map, and browser intents by formatting URIs with the correct scheme (mailto:, tel:, geo:).
  • Combine with CanOpenAsync to check if an intent can be handled before invoking it.
  • Provide graceful fallbacks when the target application is not installed or the user rejected permissions.

Prerequisites

  • Android target configured in your MAUI project (Targets: net8.0-android or later)
  • Runtime permissions (for example android.permission.CALL_PHONE) when dialing numbers directly with Launcher.TryOpenAsync or PhoneDialer API
  • User-facing explanation for why your app redirects to external experiences

Launch common URIs

Launcher examples
// Email
await Launcher.OpenAsync(new Uri($"mailto:{emailAddress}?subject={Uri.EscapeDataString(subject)}"));
// Phone
if (await Launcher.CanOpenAsync(new Uri($"tel:{phoneNumber}")))
{
await Launcher.OpenAsync($"tel:{phoneNumber}");
}
// Website
var site = new UriBuilder("https", "own.dev") { Path = "/blog" }.Uri;
await Launcher.OpenAsync(site);
// Custom scheme (deep link)
var customUri = new Uri("contoso://profiles/42");
if (!await Launcher.TryOpenAsync(customUri))
{
// Fallback to the web version if the native app is missing
await Launcher.OpenAsync("https://contoso.com/profiles/42");
}

Launcher.TryOpenAsync returns false when the intent fails. Use it to avoid exceptions and guide the user toward an alternative path.

Best practices

  • Input validation: Sanitize any user-entered components (like phone numbers or URLs) before generating the URI to avoid injection or malformed intents.
  • Permissions: Prompt for CALL_PHONE only when the user deliberately starts a call. Rely on PhoneDialer.Open when you need to let the default dialer handle the request.
  • UX: Communicate that the user is leaving your app, especially when launching external browsers or payment flows.
  • Analytics: Track deep-link success and fallback rates so you can detect missing intent filters or misconfigured schemes early.