PendingDynamicLinkData

class PendingDynamicLinkData


Provides accessor methods to dynamic links data.

Summary

Protected constructors

PendingDynamicLinkData(
    deepLink: String?,
    minVersion: Int,
    clickTimestamp: Long,
    redirectUrl: Uri?
)

Create a PendingDynamicLinkData which can be used for testing.

Public functions

Long

This function is deprecated.

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

Uri?

This function is deprecated.

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

Int

This function is deprecated.

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

Intent?

This function is deprecated.

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

Bundle

This function is deprecated.

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

Extension functions

operator Uri?

Destructuring declaration for PendingDynamicLinkData to provide link.

operator Uri?

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

operator Int

Destructuring declaration for PendingDynamicLinkData to provide minimumAppVersion.

operator Int

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

operator Long

Destructuring declaration for PendingDynamicLinkData to provide clickTimestamp.

operator Long

This function 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(
    deepLink: String?,
    minVersion: Int,
    clickTimestamp: Long,
    redirectUrl: Uri?
)

Create a PendingDynamicLinkData which can be used for testing.

Parameters
deepLink: String?

dynamic link deep link, can be null.

minVersion: Int

app minimum version. 0 if no minimum version required.

clickTimestamp: Long

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

Public functions

getClickTimestamp

fun getClickTimestamp(): Long

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

fun getLink(): Uri?

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
Uri?

The deep link if it exists, null otherwise.

getMinimumAppVersion

fun getMinimumAppVersion(): Int

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

fun getUpdateAppIntent(context: Context): Intent?

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
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

fun getUtmParameters(): Bundle

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

Returns
Bundle

Bundle of utm parameters associated with firebase dynamic link.

Extension functions

component1

operator fun PendingDynamicLinkData.component1(): Uri?

Destructuring declaration for PendingDynamicLinkData to provide link.

component1

operator fun PendingDynamicLinkData.component1(): Uri?

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.

component2

operator fun PendingDynamicLinkData.component2(): Int

Destructuring declaration for PendingDynamicLinkData to provide minimumAppVersion.

component2

operator fun PendingDynamicLinkData.component2(): Int

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.

component3

operator fun PendingDynamicLinkData.component3(): Long

Destructuring declaration for PendingDynamicLinkData to provide clickTimestamp.

component3

operator fun PendingDynamicLinkData.component3(): Long

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.