Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

How to handle AppLink navigation in MAUI

$
0
0

I followed the example in Microsoft documentation to setup app link in a MAUI app (more specifically MAUI hybrid with a web app in .NET 9).

The example ends with an override

protected override async void OnAppLinkRequestReceived(Uri uri){    base.OnAppLinkRequestReceived(uri);    // Show an alert to test that the app link was received.    await Dispatcher.DispatchAsync(async () =>    {        await Windows[0].Page!.DisplayAlert("App link received", uri.ToString(), "OK");    });    Console.WriteLine("App link: " + uri.ToString());}

and the following text:

In practice, the app link should take users directly to the content represented by the URI, without any prompts, logins, or other interruptions. Therefore, the OnAppLinkRequestReceived override is the location from which to invoke navigation to the content represented by the URI.

The app shows me the link that was used so all is working so far, but I can't understand how to navigate in OnAppLinkRequestReceived as all the examples I found use Shell.Current which is null here.


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>