Firebase Dynamic Links Depricated! Migrate to Android App Links | by shafayat hossain | Jul, 2023
Firebase has recently announced the deprecation of Firebase Dynamic Links, a service that has been used to make URLs more powerful by dynamically changing the destination of a link based on run-time conditions. Developers will have at least 12 months from the announcement date to migrate. This means that all apps must migrate to an alternative solution, such as Android App Links, by Q3 2024.
In this blog post, we will guide you through the process of migrating from Firebase Dynamic Links to Android App Links.
Android App Links are a special type of deep link that allow your website URLs to immediately open the corresponding content in your Android app, without requiring the user to select the app. This provides a seamless transition for users between your website and your app.
Android App Links use the Digital Asset Links (DAL) API to establish trust that your app has been approved by the website to automatically open links for that domain. This is done by hosting a Digital Asset Links JSON file on your website that associates your app with your website.
Android App Links are needed to provide a seamless user experience by allowing your app to respond directly to URLs on your website. This means that when a user taps a link to your website, they are taken directly to the corresponding content in your app, if it’s installed, instead of to your website in a browser. This can help increase user engagement with your app and provide a more integrated experience for the user.
The first step in implementing Android App Links is to add intent filters for the URLs you want to open in your app. The intent filter should look something like this:In this example, any link to will open the Main activity in your app. The android:autoVerify=”true” attribute tells Android to verify that you have control over the domain.
The next step is to create a Digital Asset Links (DAL) JSON file that associates your app with your website. The file should look something like this:
[{
"relation": ["delegate_permission/common.handle_all_urls"],
"target": {
"namespace": "android_app",
"package_name": "com.shafayat.helloworld",
"sha256_cert_fingerprints": ["14:6D:E9:83:C5:73:06:50:D8:EE:B9:95:2F:34:FC:64:16:A0:83:42:E6:1D:BE:A8:8A:04:96:B2:3F:36:77:9A"]
}
}]
In this example, replace the `sha256_cert_fingerprints` value with the SHA-256 fingerprint of your app’s signing certificates.
The DAL file needs to be accessible via HTTPS, without any redirects, at /.well-known/assetlinks.json
. The file needs to return a 200 OK
HTTP status code.
Once you’ve uploaded your app to the Google Play Store and set up the Digital Asset Links file on your website, you should see your domain listed under the “App Configuration” section in the “Deep links” page of your Google Play Console. This is an indication that your setup is correct and your app is ready to handle the app links from your website.