androidsdkdeep-linkingapplinksandroid-app-links

How to associate app link in android library?


I have created android library which uses app-link to redirect the users back to application and open the specific activity. It works all good but I have below concerns which I am not able to understand.

  1. I am using the Android studio app link assistant to generate "Digital Asset Links file" and associate the website. Will this approach work in production(google play store) as well, when someone tries to integrate my library? Since the singing key of the parent app and my library is different.

  2. Also should I create new domain for this purpose? My current domain is used to host frontend angular project. I am not sure adding the .well-known to this project assets/root would be a good idea.

Let me know what you think or the best practices regarding android app linking?

Edit1: The android library will be used by external clients.


Solution

  • The app links will be only consumed by the android library itself, so it will be tied up to my domain

    I suspect that is impractical.

    Since the singing key of the parent app and my library is different.

    Libraries are not signed, at least in any fashion that impacts app links.

    Will this approach work in production(google play store) as well, when someone tries to integrate my library?

    You will need to require that consumers of your library to provide the details of their apps to put in assetlinks.json for your domain. And, you will need to take those details and add them to assetlinks.json yourself. Some developers will not be interested in being involved in this or will otherwise ignore this step.

    Also, if 2+ apps using your library are installed on a particular device, which app will wind up handling the app link is indeterminate.

    Hence, I suspect that what you are trying to do is impractical.

    Also should I create new domain for this purpose?

    You need to use a domain that has a Web site that supports each of your app links. If somebody gets an app link and does not have a compatible app installed, the link needs to work in a Web browser or similar Web client. Whether that Web site is the one that has your existing project or is a separate site is up to you.