Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Xamarin.Forms.AppLinks no longer working correctly after upgrade

faceoffers28faceoffers28 USUniversity ✭✭✭
edited April 2018 in Xamarin.Forms

I was running Xamarin.Forms 2.4.0.282 and Xamarin.Forms.AppLinks 2.4.0.282 using Visual Studio 2015 Enterprise and Xamarin.Android 7.1.0.43. AppLinks were working just fine. My target was Android 7.1.

I upgraded to Visual Studio 2017 Enterprise and Xamarin.Android 8.2.0.16 (HEAD/a78295902). I also upgraded to Xamarin.Forms.AppLinks to 2.5.0.280555 and Xamarin.Forms 2.5.1.444934. My target is now Android 8.1. I also tried 7.1 and 8.0.

I've noticed that none of the new registered links are appearing in the Google Search bar. One of my old links is appearing in Google Search, but when I click on it, it pulls up the web page instead of Deep Linking into my app. Here is my code.

var url = $"http://portal.domainname.com/Offers/Details/{offerId}";

    _appLink = new AppLinkEntry
                {
                    AppLinkUri = new Uri(url, UriKind.RelativeOrAbsolute),
                    Thumbnail = ImageSource.FromFile("icon.png"),
                    Description = this.offerDescription.Text,
                    Title = this.offerName.Text,
                    IsLinkActive = true
                };

                Application.Current.AppLinks.RegisterLink(_appLink);

                /// Remove link if offer is expired
                if (dateCheck)
                {
                    Application.Current.AppLinks.DeregisterLink(_appLink);
                }

Here is my assetlinks.json.

[{
        "relation": "delegate_permission/common.handle_all_urls",
        "target": {
            "namespace": "AppName.Droid",
            "package_name": "com.domainname.appname",
            "sha256_cert_fingerprints": "MySha256Cert"
        }
}]

Anyone else seeing this behavior? Thanks!

Posts

Sign In or Register to comment.