javaandroiddeep-linkingapplinks

Deep link won't work if opened from the same domain


I've spent few hours trying to get my deep links to work. The only issue that I still have is that it won't work if the link is opened from the domain that is supposed to be handled by the app but it works fine if the link that is clicked from any other website.

For example: The link which should open the app: https://example34.com/test. If I click on a link on Github it'll work. If I open https://example34.com/ and then click on the link from there it will open this in the browser instead of the app...

What am I doing wrong?


Solution

  • Short answer: This is the expected behavior.

    When using Applinks, Chrome will always defer to directing users on the same domain to the web instead of deep linking to the native app. The only way to open the application is to trigger a URI scheme when the user is routing within the same domain. I suggest using Branch to guarantee that your links work in all of these cases.