Best android app development with firebase dyanmic link

How to Create a Firebase Dynamic Link in Android

Dynamic Links are the links whose behavior you can decide. Firebase Dynamic Links can behave differently or similarly on multiple platforms – Android, IOS, and Web platforms based on what you need.

How Do Firebase Dynamic Links Work?

Firebase Dynamic links are created to provide the best experience to your app users. You can create dynamic links in different ways. You can use Firebase Console, IOS or Android Builder API, and Rest API.

When a user opens a Firebase dynamic link in an Android or IOS device they are taken directly to the linked content in your native app. For users who don’t have your app installed, you can send them to your website.

How To Create Dynamic Links.

  1. Create a project with an empty activity.
  2. Set the Project name, package name, and minimum SDK version.
  3. Create a Firebase project and add a JSON file to your project.
  4. Add dependency in build.gradle
    implementation '' // Use the latest version
    implementation '' // Use the latest version
  5. Initialize the Firebase App in your onCreate()
  6. Generate Dynamic Link
    // Create the Dynamic Link
    DynamicLink dynamicLink = FirebaseDynamicLinks.getInstance().createDynamicLink()
    .setAndroidParameters(new DynamicLink.AndroidParameters.Builder().build())
    // Get the generated Short Link
    .addOnSuccessListener(this, shortLink -> {
    // Handle the short link, e.g., share it with users
    String shortUrl = shortLink.toString();
    // TODO: Share or use the short link
    .addOnFailureListener(this, e -> {
    // Handle errors
  7. Handle Dynamic Link Clicks
    //Manifest file
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />
    android:scheme="https" />
    .addOnSuccessListener(this, pendingDynamicLinkData ->{ 
    if (pendingDynamicLinkData != null) {
     Uri deepLink = pendingDynamicLinkData.getLink();
    // Handle the deep link as needed
    .addOnFailureListener(this, e -> {
    // Handle errors

For more Android development services reach out to Sreyas IT Solutions. Sreyas is also a leading service provider of web and e-commerce application development, website designing, data migration, database management, and many more.






To Know Us Better

Browse through our work.