ActionCodeSettings.Builder | Doclava
public static class

ActionCodeSettings.Builder

extends Object
java.lang.Object
   ↳ com.google.firebase.auth.ActionCodeSettings.Builder

Class Overview

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

Summary

Public Methods
ActionCodeSettings build()
Builds the ActionCodeSettings that this ActionCodeSettings.Builder has constructed.
ActionCodeSettings.Builder setAndroidPackageName(String androidPackageName, boolean installIfNotAvailable, String minimumVersion)
Sets the Android package name and returns the current builder instance.
ActionCodeSettings.Builder setHandleCodeInApp(boolean status)
The default is false.
ActionCodeSettings.Builder setIOSBundleId(String iOSBundleId)
To be used if the email link that is sent might be opened on an iOS device.
ActionCodeSettings.Builder setUrl(String url)
Sets the URL, which has different meanings in different contexts.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public ActionCodeSettings build ()

Builds the ActionCodeSettings that this ActionCodeSettings.Builder has constructed.

Returns
ActionCodeSettings

public ActionCodeSettings.Builder setAndroidPackageName (String androidPackageName, boolean installIfNotAvailable, 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.

Parameters
androidPackageName String

installIfNotAvailable boolean

minimumVersion String

Returns
ActionCodeSettings.Builder

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

Parameters
status boolean

Returns
ActionCodeSettings.Builder

public ActionCodeSettings.Builder setIOSBundleId (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 ActionCodeSettings.Builder instance.

Parameters
iOSBundleId String

Returns
ActionCodeSettings.Builder

public ActionCodeSettings.Builder setUrl (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.

Parameters
url String

Returns
ActionCodeSettings.Builder