UWP uri activation works in debug mode but not when app is published to the store. Why?

kidjenius 1 Reputation point
2021-02-14T18:27:21.757+00:00

Original question here: https://stackoverflow.com/questions/66192631/how-to-enable-apps-for-websites-api-for-uwp-apps-deployed-via-the-microsoft-stor

I recently added uri activation (aka Apps for websites) to my app using these docs: https://learn.microsoft.com/en-us/windows/uwp/launch-resume/web-to-app-linking. This API allows other apps to open a specific Windows app when a particular URI is launched.

While adding this to my app, it worked brilliantly while in debug mode. I click on a particular http link from a chat application like Skype, and instead of the browser opening, my apps opens instead.

But then I deployed my app to the store and now the URI activation is broken. The browser is opening instead of opening my app.

My app is open source, so here is my package manifest where I define the host: https://github.com/jenius-apps/ambie/blob/430acf4395585343e6474d7de26826471aac5a08/src/AmbientSounds.Uwp/Package.appxmanifest#L52-L56.

And then here's a link that should open my app: https://ambie-app.azurewebsites.net/play?sounds=KxXf4GZxKkCQLcadOp-Wuw,B2baqr5d_0KTTdWRfllyhA. In debug mode, clicking this link from inside an app (not browser) will correctly launch my app. But when using the store-published build of my app, the browser is opened instead.

Dgc74.png

What am I doing wrong?

Note: Microsoft To Do uses this API successfully. So I'm curious what they're doing and why I'm having problems.

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,990 questions
Universal Windows Platform (UWP)
{count} votes