ActionCodeSettings.Builder

public class ActionCodeSettings.Builder


A Builder class for ActionCodeSettings. Get an instance of this Builder using newBuilder.

Summary

Public methods

@NonNull ActionCodeSettings

Builds the ActionCodeSettings that this Builder has constructed.

@NonNull String

Returns the Firebase Dynamic Links domain used to construct the action code link.

boolean

Returns whether the out-of-band (OOB) code should be handled by the app.

@Nullable String

Returns the bundle ID of the installed Apple platforms app.

@NonNull String

Returns the URL, which is used as a state/continueURL in the action code link.

@NonNull ActionCodeSettings.Builder
setAndroidPackageName(
    @NonNull String androidPackageName,
    boolean installIfNotAvailable,
    @Nullable String minimumVersion
)

Sets the Android package name and returns the current builder instance.

@NonNull ActionCodeSettings.Builder
setDynamicLinkDomain(@NonNull String dynamicLinkDomain)

Sets the optional FDL domain, overriding the default FDL domain that would be used.

@NonNull ActionCodeSettings.Builder
setHandleCodeInApp(boolean status)

The default is false.

@NonNull ActionCodeSettings.Builder

To be used if the email link that is sent might be opened on an iOS device.

@NonNull ActionCodeSettings.Builder

Sets the URL, which has different meanings in different contexts.

Public fields

dynamicLinkDomain

public String dynamicLinkDomain

url

public String url

Public methods

build

public @NonNull ActionCodeSettings build()

Builds the ActionCodeSettings that this Builder has constructed.

getDynamicLinkDomain

public @NonNull String getDynamicLinkDomain()

Returns the Firebase Dynamic Links domain used to construct the action code link.

getHandleCodeInApp

public boolean getHandleCodeInApp()

Returns whether the out-of-band (OOB) code should be handled by the app. See setHandleCodeInApp.

getIOSBundleId

public @Nullable String getIOSBundleId()

Returns the bundle ID of the installed Apple platforms app. See setIOSBundleId.

getUrl

public @NonNull String getUrl()

Returns the URL, which is used as a state/continueURL in the action code link.

setAndroidPackageName

public @NonNull ActionCodeSettings.Builder setAndroidPackageName(
    @NonNull String androidPackageName,
    boolean installIfNotAvailable,
    @Nullable String minimumVersion
)

Sets the Android package name and returns the current builder instance. If installIfNotAvailable is set to true and the link is opened on an android device, it will try to install the app if not already available. Otherwise the web URL is used.

A minimum version string is also available. If the installed app is an older version, the user is taken to the Play Store to upgrade the app.

setDynamicLinkDomain

public @NonNull ActionCodeSettings.Builder setDynamicLinkDomain(@NonNull String dynamicLinkDomain)

Sets the optional FDL domain, overriding the default FDL domain that would be used. Must be one of the 5 domains configured in the Firebase console.

setHandleCodeInApp

public @NonNull ActionCodeSettings.Builder setHandleCodeInApp(boolean status)

The default is false. When set to true, the action code link will be sent as a universal link and will be open by the app if installed. In the false case, the code will be sent to the web widget first and then on continue will redirect to the app if installed.

setIOSBundleId

public @NonNull ActionCodeSettings.Builder setIOSBundleId(@Nullable String iOSBundleId)

To be used if the email link that is sent might be opened on an iOS device.

Sets the iOS bundle Id and returns the current Builder instance.

setUrl

public @NonNull ActionCodeSettings.Builder setUrl(@NonNull String url)

Sets the URL, which has different meanings in different contexts. For email actions, this is the state/continue URL. When the app is not installed, this is the web continue URL with any developer provided state appended (the continueURL query parameter). When the app is installed, this is contained in the Firebase dynamic link payload. In the case where the code is sent directly to the app and the app is installed, this is the continueURL query parameter in the dynamic link payload. Otherwise, when the code is handled by the widget itself, it is the payload itself.