Stay organized with collectionsSave and categorize content based on your preferences.
To receive theFirebase Dynamic Linksthatyou created, you must include theDynamic LinksSDK in your app and call theFirebaseDynamicLinks.getDynamicLink()method when your app loads to
get the data passed in theDynamic Link.
When you register your app, specify your SHA-1 signing key. If you use
App Links, also specify your SHA-256 key.
In yourmodule (app-level) Gradle file(usually<project>/<app-module>/build.gradle.ktsor<project>/<app-module>/build.gradle),
add the dependency for theDynamic Linkslibrary for Android. We recommend using theFirebase Android BoMto control library versioning.
For an optimal experience withDynamic Links, we recommendenablingGoogle Analyticsin your Firebase project and adding the Firebase SDK for Google Analytics to your app.
dependencies{// Import theBoMfor the Firebase platformimplementation(platform("com.google.firebase:firebase-bom:34.2.0"))// Add the dependencies for theDynamic LinksandAnalyticslibraries// When using theBoM, you don't specify versions in Firebase library dependenciesimplementation'com.google.firebase:firebase-dynamic-links'implementation'com.google.firebase:firebase-analytics'}
By using theFirebase Android BoM,
your app will always use compatible versions of Firebase Android libraries.
(Alternative)
Add Firebase library dependencies without using theBoM
If you choose not to use theFirebase BoM, you must specify each Firebase library version
in its dependency line.
Note that if you usemultipleFirebase libraries in your app, we strongly
recommend using theBoMto manage library versions, which ensures that all versions are
compatible.
dependencies{// Add the dependencies for theDynamic LinksandAnalyticslibraries// When NOT using theBoM, you must specify versions in Firebase library dependenciesimplementation'com.google.firebase:firebase-dynamic-links:22.1.0'implementation'com.google.firebase:firebase-analytics:23.0.0'}
In theFirebaseconsole, open theDynamic Linkssection. Accept the terms of service if you are prompted to do so.
Add an intent filter for deep links
As withplain 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 theDynamic Linkwill redirect to your domain if your app is installed. This is required for your app to
receive theDynamic Linkdata after it is installed/updated from the Play Store and one taps on
Continue button. InAndroidManifest.xml:
When users open aDynamic Linkwith a deep link to the scheme and host you specify, your app will
start the activity with this intent filter to handle the link.
Handle deep links
To receive the deep link, call thegetDynamicLink()method:
Kotlin
Firebase.dynamicLinks.getDynamicLink(intent).addOnSuccessListener(this){pendingDynamicLinkData:PendingDynamicLinkData?->// Get deep link from result (may be null if no link is found)vardeepLink:Uri?=nullif(pendingDynamicLinkData!=null){deepLink=pendingDynamicLinkData.link}// Handle the deep link. For example, open the linked// content, or apply promotional credit to the user's// account.// ...}.addOnFailureListener(this){e->Log.w(TAG,"getDynamicLink:onFailure",e)}
FirebaseDynamicLinks.getInstance().getDynamicLink(getIntent()).addOnSuccessListener(this,newOnSuccessListener<PendingDynamicLinkData>(){@OverridepublicvoidonSuccess(PendingDynamicLinkDatapendingDynamicLinkData){// Get deep link from result (may be null if no link is found)UrideepLink=null;if(pendingDynamicLinkData!=null){deepLink=pendingDynamicLinkData.getLink();}// Handle the deep link. For example, open the linked// content, or apply promotional credit to the user's// account.// ...// ...}}).addOnFailureListener(this,newOnFailureListener(){@OverridepublicvoidonFailure(@NonNullExceptione){Log.w(TAG,"getDynamicLink:onFailure",e);}});
You must callgetDynamicLink()in every activity that might be
launched by the link, even though the link might be available from the intent
usinggetIntent().getData(). CallinggetDynamicLink()retrieves the link and clears that data so it is only processed once by your
app.
You normally callgetDynamicLink()in the main activity as well
as any activities launched by intent filters that match the link.
Record analytics
The following events can be automatically tracked inGoogle Analyticsand shown in theFirebaseconsole.
dynamic_link_app_open
dynamic_link_first_open
dynamic_link_app_update
In order to register these events, you need to configureGoogle Analyticsbefore you
retrieve the deep link. Check the following conditions are met:
CallFirebaseDynamicLinks.getDynamicLink()in your app entry points:
On Android 6.0 (API level 23) and higher, you can set up your app to handleDynamic Linksdirectly when your app is already installed by usingAndroid App Links.
Ensure that you have added the SHA256 certificate fingerprint for your app into your project in
theFirebaseconsole.Dynamic Linkswill handle setting up the App Links website association for
yourDynamic Linksdomain.
Add an auto-verified intent filter to the Activity that will handle theDynamic Link, setting the
host to your project'sDynamic Linksdomain asfound in theFirebaseconsole. In
theAndroidManifest.xml:
Note that theandroid:hostmust be set to yourDynamic Linksdomain, and not the domain
of your deep link.
AllautoVerifyintent filters in your manifest must be registered in order for App
Links to engage. Firebase handles this automatically for yourDynamic Linksdomains, but you can check
this by opening theassetlinks.jsonfile hosted on yourDynamic Linksdomain:
https://YOUR_DOMAIN/.well-known/assetlinks.json
All of your Firebase apps' package names should be included.
Dynamic Linkswill now be sent directly to your app. You will be able to get the deep link and otherDynamic Linkdata by callinggetDynamicLink()in the Activity you added the App Links
intent filter to (as described inHandle deep links).
Note:Since invoking through App Links takes the user directly to the app, a
Dynamic Link cannot honor the required minimum version. So once the app is opened, you
need to compare the Dynamic Link's minimum version (getminimumappversion) againstPackageInfo.versionCodeand redirect the user to upgrade the app if required usinggetUpdateAppIntent.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,[]]