PendingDynamicLinkData

public class PendingDynamicLinkData


Provides accessor methods to dynamic links data.

Summary

Protected constructors

PendingDynamicLinkData(
    @Nullable String deepLink,
    int minVersion,
    long clickTimestamp,
    @Nullable Uri redirectUrl
)

Create a PendingDynamicLinkData which can be used for testing.

Public methods

long

This method is deprecated.

Firebase Dynamic Links is deprecated and should not be used in new projects.

@Nullable Uri

This method is deprecated.

Firebase Dynamic Links is deprecated and should not be used in new projects.

int

This method is deprecated.

Firebase Dynamic Links is deprecated and should not be used in new projects.

@Nullable Intent

This method is deprecated.

Firebase Dynamic Links is deprecated and should not be used in new projects.

@NonNull Bundle

This method is deprecated.

Firebase Dynamic Links is deprecated and should not be used in new projects.

Extension functions

final Uri

Destructuring declaration for PendingDynamicLinkData to provide link.

final Uri

This method is deprecated. Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.

final int

Destructuring declaration for PendingDynamicLinkData to provide minimumAppVersion.

final int

This method is deprecated. Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.

final long

Destructuring declaration for PendingDynamicLinkData to provide clickTimestamp.

final long

This method is deprecated. Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.

Protected constructors

PendingDynamicLinkData

protected PendingDynamicLinkData(
    @Nullable String deepLink,
    int minVersion,
    long clickTimestamp,
    @Nullable Uri redirectUrl
)

Create a PendingDynamicLinkData which can be used for testing.

Parameters
@Nullable String deepLink

dynamic link deep link, can be null.

int minVersion

app minimum version. 0 if no minimum version required.

long clickTimestamp

timestamp of when the dynamic link was clicked. If zero, will be current time.

Public methods

getClickTimestamp

public long getClickTimestamp()

Gets the time that the user clicked on the Firebase Dynamic Link. This can be used to determine the amount of time that has passed since the user selected the link until the app is launched.

Returns
long

The number of milliseconds that have elapsed since January 1, 1970.

getLink

public @Nullable Uri getLink()

Returns the link parameter of the Firebase Dynamic Link.

This link will be set as data in the launch Intent, see setData, which will match android.content.IntentFilter to deep link into the app.

Returns
@Nullable Uri

The deep link if it exists, null otherwise.

getMinimumAppVersion

public int getMinimumAppVersion()

Gets the minimum app version requested to process the Firebase Dynamic Link that can be compared directly with versionCode. If the minimum version code is higher than the installed app version code, the app can upgrade using getUpdateAppIntent.

Returns
int

minimum version code set on the dynamic link, or 0 if not specified.

getUpdateAppIntent

public @Nullable Intent getUpdateAppIntent(@NonNull Context context)

Gets the intent to update the app to the version in the Play Store.

An intent is returned to be used as a parameter to startActivity to launch the Play Store update flow for the app. After update, if the user re-launches the app from the Play Store by selecting the displayed Continue button then the deep link will be set as the data in the re-launch intent and will launch any Activity with an android.content.IntentFilter that matches the deeplink. This is the same as the new install flow. The dynamic link returned during initial launch will not be available from getDynamicLink during the update re-launch.

If the minimum version required by the dynamic link is not greater than the currently installed version, then null is returned.

Returns
@Nullable Intent

- An Intent that will launch the Play Store to update the app, or null if the dynamic link minimum version code is not greater than the installed version.

getUtmParameters

public @NonNull Bundle getUtmParameters()

Returns the Bundle which contains utm parameters associated with the Firebase Dynamic Link.

Returns
@NonNull Bundle

Bundle of utm parameters associated with firebase dynamic link.

Extension functions

FirebaseDynamicLinksKt.component1

public final Uri FirebaseDynamicLinksKt.component1(
    @NonNull PendingDynamicLinkData receiver
)

Destructuring declaration for PendingDynamicLinkData to provide link.

FirebaseDynamicLinksKt.component1

public final Uri FirebaseDynamicLinksKt.component1(
    @NonNull PendingDynamicLinkData receiver
)

Destructuring declaration for PendingDynamicLinkData to provide link.

Deprecation Notice: The Kotlin extensions (KTX) APIs have been added to their respective main modules, and the Kotlin extension (KTX) APIs in com.google.firebase.firebase-dynamic-links-ktx are now deprecated. As early as April 2024, we'll no longer release KTX modules. For details, see the FAQ about this initiative.

FirebaseDynamicLinksKt.component2

public final int FirebaseDynamicLinksKt.component2(
    @NonNull PendingDynamicLinkData receiver
)

Destructuring declaration for PendingDynamicLinkData to provide minimumAppVersion.

FirebaseDynamicLinksKt.component2

public final int FirebaseDynamicLinksKt.component2(
    @NonNull PendingDynamicLinkData receiver
)

Destructuring declaration for PendingDynamicLinkData to provide minimumAppVersion.

Deprecation Notice: The Kotlin extensions (KTX) APIs have been added to their respective main modules, and the Kotlin extension (KTX) APIs in com.google.firebase.firebase-dynamic-links-ktx are now deprecated. As early as April 2024, we'll no longer release KTX modules. For details, see the FAQ about this initiative.

FirebaseDynamicLinksKt.component3

public final long FirebaseDynamicLinksKt.component3(
    @NonNull PendingDynamicLinkData receiver
)

Destructuring declaration for PendingDynamicLinkData to provide clickTimestamp.

FirebaseDynamicLinksKt.component3

public final long FirebaseDynamicLinksKt.component3(
    @NonNull PendingDynamicLinkData receiver
)

Destructuring declaration for PendingDynamicLinkData to provide clickTimestamp.

Deprecation Notice: The Kotlin extensions (KTX) APIs have been added to their respective main modules, and the Kotlin extension (KTX) APIs in com.google.firebase.firebase-dynamic-links-ktx are now deprecated. As early as April 2024, we'll no longer release KTX modules. For details, see the FAQ about this initiative.