DynamicLink.Builder

public static final class DynamicLink.Builder extends Object

Builder for creating Dynamic Links.

Public Method Summary

DynamicLink
buildDynamicLink()
Creates a Dynamic Link from the parameters.
Task<ShortDynamicLink>
buildShortDynamicLink()
Creates a shortened Dynamic Link from the parameters.
Task<ShortDynamicLink>
buildShortDynamicLink(int suffix)
Creates a shortened Dynamic Link from the parameters.
DynamicLink.Builder
setAndroidParameters(DynamicLink.AndroidParameters androidParameters)
Sets the Android parameters.
DynamicLink.Builder
setDomainUriPrefix(String domainUriPrefix)
Sets the domain uri prefix (of the form "//xyz.app.goo.gl", "//custom.com/xyz") to use for this Dynamic Link.
DynamicLink.Builder
setDynamicLinkDomain(String dynamicLinkDomain)
This method is deprecated. Use setDomainUriPrefix(String) instead
DynamicLink.Builder
setGoogleAnalyticsParameters(DynamicLink.GoogleAnalyticsParameters googleAnalyticsParameters)
Sets the Google Analytics parameters.
DynamicLink.Builder
setIosParameters(DynamicLink.IosParameters iosParameters)
Sets the iOS parameters.
DynamicLink.Builder
setItunesConnectAnalyticsParameters(DynamicLink.ItunesConnectAnalyticsParameters itunesConnectAnalyticsParameters)
Sets the iTunes Connect App Analytics parameters.
DynamicLink.Builder
setLink(Uri link)
Set the deep link.
DynamicLink.Builder
setLongLink(Uri longLink)
Set the long Dynamic Link.
DynamicLink.Builder
setNavigationInfoParameters(DynamicLink.NavigationInfoParameters navigationInfoParameters)
Sets the navigation info parameters.
DynamicLink.Builder
setSocialMetaTagParameters(DynamicLink.SocialMetaTagParameters socialMetaTagParameters)
Sets the social meta-tag parameters.

Inherited Method Summary

Public Methods

public DynamicLink buildDynamicLink ()

Creates a Dynamic Link from the parameters.

Throws
IllegalArgumentException if the FDL domain is not set. Set with setDynamicLinkDomain(String).

public Task<ShortDynamicLink> buildShortDynamicLink ()

Creates a shortened Dynamic Link from the parameters.

Throws
IllegalArgumentException if the FDL domain and api key are not set. Set FDL domain with setDynamicLinkDomain(String). Ensure that google-services.json file is setup for the app if the api key is not set.

public Task<ShortDynamicLink> buildShortDynamicLink (int suffix)

Creates a shortened Dynamic Link from the parameters.

Parameters
suffix The desired length of the Dynamic Link. One of UNGUESSABLE or SHORT.
Throws
IllegalArgumentException if the FDL domain and api key are not set. Set FDL domain with setDynamicLinkDomain(String). Ensure that google-services.json file is setup for the app if the api key is not set.

public DynamicLink.Builder setAndroidParameters (DynamicLink.AndroidParameters androidParameters)

Sets the Android parameters.

Parameters
androidParameters The AndroidParameters from build().

public DynamicLink.Builder setDomainUriPrefix (String domainUriPrefix)

Sets the domain uri prefix (of the form "//xyz.app.goo.gl", "//custom.com/xyz") to use for this Dynamic Link.

Parameters
domainUriPrefix The target project's Domain Uri Prefix. You can find this value in the Dynamic Links section of the Firebase console.

public DynamicLink.Builder setDynamicLinkDomain (String dynamicLinkDomain)

This method is deprecated.
Use setDomainUriPrefix(String) instead

Sets the domain (of the form "xyz.app.goo.gl") to use for this Dynamic Link. Only applicable for *.page.link and *.app.goo.gl, use setDomainUriPrefix(String) if domain is custom.

Parameters
dynamicLinkDomain The target project's Dynamic Links domain. You can find this value in the Dynamic Links section of the Firebase console.

public DynamicLink.Builder setGoogleAnalyticsParameters (DynamicLink.GoogleAnalyticsParameters googleAnalyticsParameters)

Sets the Google Analytics parameters.

Parameters
googleAnalyticsParameters The Google