PathPrefix Path not working Android app Link

Dipannita Das 21 Reputation points
2022-01-11T14:48:05.483+00:00

Following this tutorial https://learn.microsoft.com/en-us/xamarin/android/platform/app-linking

Created assetlinks.json https://dipannitadas.azurewebsites.net/.well-known/assetlinks.json

Added below code to MainActivity

[IntentFilter(new[] { Intent.ActionView },  
                  DataScheme = "https",  
                  DataHost = "test.yourdomain.com",  
                  DataPath = "/Ambassador/TCAnnualRenewal",  
                  AutoVerify = true,  
                  Categories = new[] { Intent.CategoryDefault, Intent.CategoryBrowsable })]  
      
    public partial class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity{  

}

Install the app on debug mode on device via Visual Studio 2019.

If I remove DataPath = "/Ambassador/TCAnnualRenewal", https://dipannitadas.azurewebsites.net opens the app correctly
If add DataPath or DataPrefix none of the below links works including https://dipannitadas.azurewebsites.net

https://dipannitadas.azurewebsites.net
https://dipannitadas.azurewebsites.net/Ambassador/TCAnnualRenewal

I have used keytool.exe -list -v -keystore "%LocalAppData%\Xamarin\Mono for Android\debug.keystore" -alias androiddebugkey -storepass android -keypass android

and used SHA256 in the assetlinks.json

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,296 questions
{count} votes