Android
Add your android app to the Project from the dashboard
When you add your android app, specify your SHA-1, and SHA-256 signing key.
Add an intent filter for deep links
you must add a new intent filter to the activity that handles deep links for your app. The intent filter should catch deep links of your domain, since the Dynamic Link will redirect to your domain if your app is installed. This is required for your app to receive the Dynamic Link data after it is installed/updated from the Play Store.
In AndroidManifest.xml
:
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data
android:host="example.com"
android:scheme="https"/>
</intent-filter>
When users open a Dynamic Link with a deep link to the scheme and host you specify, your app will start the activity with this intent filter to handle the link.
Handling Dynamic Links using App Links
On Android 6.0 (API level 23) and higher, you can set up your app to handle Dynamic Links directly when your app is already installed by using Android App Links.
Ensure that you have added the SHA256 certificate fingerprint for your app into your project in the Dynamc dashboard. Dynamic Links will handle setting up the App Links website association for your Dynamic Links domain.
Add an auto-verified intent filter to the Activity that will handle the Dynamic Link, setting the host to your project’s Dynamic Links domain as found in the Dynamc dashboard. In the AndroidManifest.xml
:
<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:host="example.com/link" android:scheme="http"/>
<data android:host="example.com/link" android:scheme="https"/>
</intent-filter>
Note that the android:host
must be set to your Dynamic Links domain, and not the domain of your deep link.
All autoVerify
intent filters in your manifest must be registered in order for App Links to engage. Dynamc handles this automatically for your Dynamic Links domains, but you can check this by opening the assetlinks.json
file hosted on your Dynamic Links domain:
https://YOUR_DOMAIN/.well-known/assetlinks.json
All of your apps’ package names should be included.