Hello everyone ,
We are going to create deep links for our app.
When a clicked link or programmatic request invokes a web URI intent, the Android system tries each of the following actions, in sequential order, until the request succeeds:
- Open the user’s preferred app that can handle the URI, if one is designated.
- Open the only available app that can handle the URI.
- Allow the user to select an app from a dialog
This is taken from Android documentation
- Add your package name e.g. com.thesocial.bus
- Upload intent-filters.txt in Assets
intent-filters.txt (464 Bytes)
<intent-filter android:autoVerify="true"> <action android:name="android.intent.action.VIEW"/> <category android:name="android.intent.category.DEFAULT"/> <category android:name="android.intent.category.BROWSABLE"/> <data android:scheme="http" /> <data android:scheme="https" /> <data android:host="www.thesocialbus.com"/> // To accept more domain or subdomain. Just add a new data element // <data android:host="www.example.com"/> </intent-filter>
Basic information about above code
autoVerify - When `it’s true and present in your app’s intent filters, installing your app on a device that runs Android 6.0 (API level 23) or higher causes the system to automatically verify the hosts associated with the URLs in your app’s intent filters
scheme - You can add http, https and any custom text e.g. app.
host - You can add the domain which you want to verify e.g. www.thesocialbus.com
This is going to be added in your app’s AndroidManifest.xml (Screen1). So, Android will always open our app whenever https://www.thesocialbus.com or http://www.thesocialbus.com is clicked.
We have to use this block to get which url is clicked and redirected to your app. It is available in Screen’s properties.
Now, build your project once to get SHA-256 fingerprint generated.
To create a deep link, You need :
- A website’s link (We will use www.thesocialbus.com). Thanks to @Jay for his website.
assetlinks.jsonfile which must be uploaded at
It is required for auto verifying your domain in devices above Android 12.
Visit this site and generate the assetlinks.json file.
Hosting site domain - Enter your domain name e.g. www.thesocialbus.com
App package name - Enter app’s package name e.g. com.thesocialbus
App package fingerprint (SHA256) - Get it from Appzard workspace
Click on Profile icon
Click on Keystore Information
Copy SHA-256 fingerprint
After generating the statement list. Copy the generated statement and paste in assetlinks.json. Now, upload it at
Hurray ! You have successfully added deep links in your project. Build your project and test it.
Tested on Android 12 and Android 9. working good for me
Auto verify works too
Q1. Why SHA-256 fingerprint is not visible ?
Ans. To generate SHA-256, you need to build the apk once
Q2. How can we accept all subdomains ?
Ans. If you want to accept all subdomains you have to use an asterisk (*) character before your host like this: *.example.com.
Q3. My domain don’t have www or any subdomain ? What to do ?
Ans. Add host without subdomain like this
I tested it. And I was able to open my app but no start data was there.
Reply to this topic if you have any query