I'm trying to use Deep Link for Android in Maui, but when I open my application from the link newapp://result
, it opens either the home page or the last page that was open in my application. And when I try to navigate to another page, the application crashes. This happens whether I use appshell navigation or navigate using Push. This is how my activity is configured: [IntentFilter(new[] { Intent.ActionView },
Categories = new[]
{
Intent.ActionView,
Intent.CategoryDefault,
Intent.CategoryBrowsable,
},
DataScheme = "newapp"
)
]
[Activity(Exported = true, Theme = "@style/Maui.SplashTheme")]
internal class CallbackActivity: MauiAppCompatActivity
{
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
var data = Intent.DataString;
}
}
.
UPDATE In this repository I created an example of the problem, to test it you must run it on an android device, then go to the demoapp://result page and the application should open, there press the navigate button and the application breaks, but if you use the application normally without opening it by demoapp://result, it works without any problem. https://github.com/bikotoru/problem-intent-maui/tree/main