Xamarin.forms OnAppLinkRequestReceived

I am trying to use https://developer.xamarin.com/api/member/Xamarin.Forms.Application.OnAppLinkRequestReceived/p/System.Uri/ but it can't seem to be called in any way.

Has anyone ever tried to implement this new method? I tried several ways to implement different features, they all open the application perfectly, so they are correctly configured, but this method is never called.

Thank.

+4
source share
1 answer

This is how I set it up in Android.

Put it above your MainActivity.cs

 [IntentFilter(new[] { Android.Content.Intent.ActionView },
 Categories = new[]
 {
     Android.Content.Intent.CategoryDefault,
     Android.Content.Intent.CategoryBrowsable
 },
 DataScheme = "http",
 DataPathPrefix = "/tesla/",
 DataHost = "exrin.net")]

This logs activity when the application is installed. Change the URL to the desired URL.

Android ( iOS) Nuget Xamarin Forms AppLinks

OnCreate , Xamarin Forms Init

 AndroidAppLinks.Init(this);

, URL- ( http://exrin.net/tesla), :

enter image description here

, , URL- URI. App.cs(Xamarin.Forms.Application)

    protected override void OnAppLinkRequestReceived(Uri uri)
    {  
        base.OnAppLinkRequestReceived(uri);
    }

URI, , URL-/

Xamarin Forms AppLinks

+1

All Articles