Making Dynamic Links Easier

Firebase Dynamic Links give you a single link that can send users either to your iOS or Android app, if they have it installed, or to the appropriate listing in the App Store or on Google Play, if they don’t. Even better than that, Dynamic Links will deep link your users to the content they were looking for, even if they had to install the app in the process.

We’ve been working hard over the last year to make this experience smoother and more powerful for both developers and users, and we’re happy to bring the latest set of improvements to developers in our iOS and Android SDKs.

Creating Dynamic Links through the Firebase Console was great for promotional campaigns, but we heard from our developers that they needed to be able to create user-to-user sharing campaigns programmatically from within their app.

To help you do just that, we’ve added support for generating both long and short dynamic links to the iOS and Android Firebase SDKs, which makes it quicker and easier to support these kind of use cases:


guard let deepLink = URL(string: "") else { return }

let components = DynamicLinkComponents(link: deepLink, domain: domain)

let iOSParams = DynamicLinkIOSParameters(bundleID: bundleID)
iOSParams.minimumAppVersion = minVersion
components.iOSParameters = iOSParams

// Build the dynamic link
let link = components.url

// Or create a shortened dynamic link 
components.shorten { (shortURL, warnings, error) in
      if let error = error {
    // TODO: Handle shortURL.


String deepLink = "";

DynamicLink.Builder builder = FirebaseDynamicLinks.getInstance()
        .setAndroidParameters(new DynamicLink.AndroidParameters.Builder()

// Build the dynamic link
DynamicLink link = builder.buildDynamicLink();

// Or create a shortened dynamic link 
        .addOnSuccessListener(new OnSuccessListener() {
            public void onSuccess(ShortDynamicLink shortDynamicLink) {

New Android API

We’ve also rebuilt the Android API from the ground up to make it easier to handle incoming Dynamic Links into your app, with the new FirebaseDynamicLinks class. You can add the new library by adding the following to your build.gradle:

compile ""

Then processing an incoming Dynamic Link is easy in your launched activity:

    new OnSuccessListener() {
      public void onSuccess(PendingDynamicLinkData data) {
      if (data == null || data.getLink() == null) {
        // No FDL pending for this app, don't do anything.

      Intent launchIntent = data.getUpdateAppIntent(MainActivity.this);
      if (launchIntent != null) {
        startActivity(launchIntent); // launch upgrade flow.

     Uri deepLink = dynamicLink.getLink();
     String myAppItemId = deepLink.getQueryParameter("myAppItemId");
     // TODO(developer): Display content for myAppItemId here! 

As always, if you have any questions or feedback on the new API, please reach out through any of the channels on our support page.