ActionCodeSettings.Builder

public static final class ActionCodeSettings.Builder extends Object

Public Method Summary

ActionCodeSettings
build()
Builds a new ActionCodeSettings.
ActionCodeSettings.Builder
setAndroidInstallApp(boolean androidInstallApp)
Specifies whether to install the Android app if the device supports it and the app is not already installed.
ActionCodeSettings.Builder
setAndroidMinimumVersion(String androidMinimumVersion)
Sets the minimum version for Android app.
ActionCodeSettings.Builder
setAndroidPackageName(String androidPackageName)
Sets the Android package name of the app where the link should be handled if the Android app is installed.
ActionCodeSettings.Builder
setDynamicLinkDomain(String dynamicLinkDomain)
Sets the dynamic link domain to use for the current link if it is to be opened using Firebase Dynamic Links, as multiple dynamic link domains can be configured per project.
ActionCodeSettings.Builder
setHandleCodeInApp(boolean handleCodeInApp)
Specifies whether to open the link via a mobile app or a browser.
ActionCodeSettings.Builder
setIosBundleId(String iosBundleId)
Sets the bundle ID of the iOS app where the link should be handled if the application is already installed on the device.
ActionCodeSettings.Builder
setUrl(String url)
Sets the link continue/state URL.

Inherited Method Summary

Public Methods

public ActionCodeSettings build ()

Builds a new ActionCodeSettings.

Returns

public ActionCodeSettings.Builder setAndroidInstallApp (boolean androidInstallApp)

Specifies whether to install the Android app if the device supports it and the app is not already installed.

Parameters
androidInstallApp true to install the app, and false otherwise.
Returns
  • This builder.

public ActionCodeSettings.Builder setAndroidMinimumVersion (String androidMinimumVersion)

Sets the minimum version for Android app. If the installed app is an older version, the user is taken to the Play Store to upgrade the app.

Parameters
androidMinimumVersion Minimum version string.
Returns
  • This builder.

public ActionCodeSettings.Builder setAndroidPackageName (String androidPackageName)

Sets the Android package name of the app where the link should be handled if the Android app is installed. Must be specified when setting other Android-specific settings.

Parameters
androidPackageName Package name string. Must be specified, and must not be null or empty.
Returns
  • This builder.

public ActionCodeSettings.Builder setDynamicLinkDomain (String dynamicLinkDomain)

Sets the dynamic link domain to use for the current link if it is to be opened using Firebase Dynamic Links, as multiple dynamic link domains can be configured per project. This setting provides the ability to explicitly choose one. If none is provided, the oldest domain is used by default.

Parameters
dynamicLinkDomain Firebase Dynamic Link domain string.
Returns
  • This builder.

public ActionCodeSettings.Builder setHandleCodeInApp (boolean handleCodeInApp)

Specifies whether to open the link via a mobile app or a browser. The default is false. When set to true, the action code link is sent as a Universal Link or an Android App Link and is opened by the app if installed. In the false case, the code is sent to the web widget first and then redirects to the app if installed.

Parameters
handleCodeInApp true to open the link in the app, and false otherwise.
Returns
  • This builder.

public ActionCodeSettings.Builder setIosBundleId (String iosBundleId)

Sets the bundle ID of the iOS app where the link should be handled if the application is already installed on the device.

Parameters
iosBundleId The iOS bundle ID string.

public ActionCodeSettings.Builder setUrl (String url)

Sets the link continue/state URL.

This parameter has different meanings in different contexts:

  • When the link is handled in the web action widgets, this is the deep link in the continueUrl query parameter.
  • When the link is handled in the app directly, this is the continueUrl query parameter in the deep link of the Dynamic Link.

This parameter must be specified when creating a new ActionCodeSettings instance.

Parameters
url Continue/state URL string.
Returns
  • This builder.