Builder

data class Builder

Constructors

Link copied to clipboard
fun Builder()

Functions

Link copied to clipboard

Builds the configuration object.

Link copied to clipboard
fun setAdmMessagingRegistrationEnabled(admMessagingRegistrationEnabled: Boolean): BrazeConfig.Builder

Enables automatic registration for Amazon Device Messaging. When manually passing ADM push tokens to Braze, this setting should be disabled.

Link copied to clipboard

Sets the API key. An empty API key will have no effect and will not be present in the built config object.

Link copied to clipboard

Sets whether Braze Geofences are automatically requested by the Braze SDK. This defaults to true.

Link copied to clipboard
fun setBadNetworkDataFlushInterval(badNetworkIntervalSeconds: Int): BrazeConfig.Builder

Sets the data flush interval on poor connections. On android.os.Build.VERSION_CODES.N and below, this for example is GPRS and/or EDGE. Otherwise, this is defined as roaming data connections or connections where the max network link upstream/downstream bandwidth is below 4 Mbps.

fun setContentCardsUnreadVisualIndicatorEnabled(contentCardsUnreadVisualIndicatorEnabled: Boolean): BrazeConfig.Builder

Sets whether the Content Cards unread visual indication bar is enabled.

Link copied to clipboard

Sets a custom API endpoint. When the Braze singleton is initialized, it will point to the specified custom endpoint.

Link copied to clipboard

The set of custom location provider names. Note that only one provider will ultimately be used to provide a session start location.

Link copied to clipboard
fun setCustomWebViewActivityClass(customWebViewActivityClass: Class<*>): BrazeConfig.Builder

Sets the activity that Braze will use when opening a deeplink inside the app via a android.webkit.WebView instead of the default Braze WebView Activity.

Link copied to clipboard
fun setDefaultNotificationAccentColor(defaultNotificationAccentColor: Int): BrazeConfig.Builder

This integer sets the default accent color for push notifications on Android Lollipop and higher. If not specified, the default background color is gray (the same gray Lollipop uses for system notifications). This value can be overridden at runtime by a push notification that sets a custom accent color.

Link copied to clipboard

Sets the android.app.NotificationChannel user facing description as seen via NotificationChannel.getDescription for the Braze default NotificationChannel.

Link copied to clipboard

Sets the android.app.NotificationChannel user facing name as seen via NotificationChannel.getName for the Braze default NotificationChannel.

Link copied to clipboard

Device object allowlisting is a feature where the SDK can be configured to only send a subset of the device object keys/values according to some allowlist. An empty allowlist will result in no device data being sent to Braze.

Link copied to clipboard

Device object allowlisting is a feature where the SDK can be configured to only send a subset of the device object keys/values according to some allowlist.

Link copied to clipboard
Link copied to clipboard

Sets whether a push story is automatically dismissed when clicked.

Link copied to clipboard

Sets the sender ID key used to register for Firebase Cloud Messaging. String cannot be empty

Link copied to clipboard

Sets whether the Braze Geofences feature is enabled. Note that if this field is not set, location collection being enabled/disabled will determine whether Braze Geofences are enabled.

Link copied to clipboard
fun setGoodNetworkDataFlushInterval(goodNetworkIntervalSeconds: Int): BrazeConfig.Builder

Sets the data flush interval on good connections. On android.os.Build.VERSION_CODES.N and below, this for example is 3G. Otherwise, this is defined as roaming data connections or connections where the max network link upstream/downstream bandwidth is between 4 Mbps and 14 Mbps.

Link copied to clipboard
fun setGreatNetworkDataFlushInterval(greatNetworkIntervalSeconds: Int): BrazeConfig.Builder

Sets the data flush interval on great connections. On android.os.Build.VERSION_CODES.N and below, this for example is 4G or Wifi. Otherwise, this is defined as roaming data connections or connections where the max network link upstream/downstream bandwidth is above 14 Mbps.

Link copied to clipboard
fun setHandlePushDeepLinksAutomatically(handlePushDeepLinksAutomatically: Boolean): BrazeConfig.Builder

Enables Braze to automatically open your app and any deep links when a push notification is clicked. See BrazeNotificationUtils.routeUserWithNotificationOpenedIntent() in the UI project for more details.

Gets whether the In-App Message Test Push will attempt to automatically display the test In-App Message without the need for clicking on a push beforehand. If the app is in the background or otherwise can't immediately display the In-App Message, a push will be displayed instead.

Sets the maximum length of time, in milliseconds, to wait for the android.webkit.WebViewClient.onPageFinished callback to fire before displaying an HTML In-App Message.

Sets whether the SDK to automatically register for Firebase Cloud Messaging. When manually passing push tokens to Braze, this setting should be disabled.

Determines whether the Braze will automatically register tokens in com.google.firebase.messaging.FirebaseMessagingService.onNewToken.

Determines whether view window insets are applied automatically for HTML In-App Messages. By default, this is false.

In-app message accessibility exclusive mode, when enabled, forces accessibility readers to only be able to read currently displaying in-app messages and no other screen contents. A common use for this feature is the desire to prevent Android TalkBack from reading out UI elements "behind" a currently displaying in-app message.

Link copied to clipboard

This boolean sets whether Braze should automatically collect location (if the user permits). If set to true, location data will be collected once at the start of each session. If not specified or set to false, all location collection will be disabled and location will never be set for the user unless integrating apps manually call BrazeUser.setLastKnownLocation.

Sets whether a screen wakelock will be acquired to wake the device screen for push notifications. Note that the android.Manifest.permission#WAKE_LOCK must also be held by the app for the wakelock to be acquired if this is enabled.

Link copied to clipboard

Sets whether SDK authentication is enabled.

Link copied to clipboard
fun setIsSessionStartBasedTimeoutEnabled(isSessionStartBasedTimeoutEnabled: Boolean): BrazeConfig.Builder

Sets the session timeout behavior to be either session-start or session-end based. When true, the session timeout and eventual session end is calculated using the timestamp of the start of the session. When false, the session timeout and eventual session end is calculated using the end of the session.

Determines whether View.isInTouchMode is required to show HTML In-App Messages. By default, this is true.

Link copied to clipboard
fun setLargeNotificationIcon(largeNotificationIconName: String): BrazeConfig.Builder

Sets the large icon used in notifications.

Link copied to clipboard

When true, sets the Newsfeed visual indicator for read/unread status to be enabled.

Link copied to clipboard

Sets the activity that Braze will add to the back stack when automatically following deep links for push.

Link copied to clipboard
fun setPushDeepLinkBackStackActivityEnabled(pushDeepLinkBackStackActivityEnabled: Boolean): BrazeConfig.Builder

Enables Braze to add an activity to the back stack when automatically following deep links for push. When disabled, no activity is added to the back stack only the deep link is followed.

Link copied to clipboard

Sets whether a the text content in push notifications should be interpreted and rendered as Html using android.text.Html.fromHtml.

Link copied to clipboard

Internal method. Do not use.

Link copied to clipboard

Configures the SDK Metadata for this integration. Note that fields set here will append any fields set elsewhere on the SDK.

Link copied to clipboard

Internal method. Do not use.

Link copied to clipboard
fun setSessionTimeout(sessionTimeoutSeconds: Int): BrazeConfig.Builder

The length of time before a session times out in seconds. The session manager will "re-open" otherwise closed sessions if the call to StartSession comes within this interval.

Link copied to clipboard
fun setSmallNotificationIcon(smallNotificationIconName: String): BrazeConfig.Builder

Sets the small icon used in notifications.

fun setTriggerActionMinimumTimeIntervalSeconds(triggerActionMinimumTimeIntervalSeconds: Int): BrazeConfig.Builder

The minimum interval in seconds between actions, such as an in-app message, that can be triggered by an in-app event, such as the logging of a custom event. This is a general rate limit for actions to prevent overloading a user with messages.