Companion

object Companion

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun configure(context: Context, config: BrazeConfig?): Boolean

Optional static method to set configuration values for the Braze singleton, overriding whatever values are present in the braze.xml. Calling this method at the beginning of each app run is encouraged.

Link copied to clipboard

Disables the Braze SDK. This call persists across Braze SDK instances until Braze.enableSdk is called.

Testing utility method that enables mocking for all Braze SDK network requests, essentially turning the SDK "off".

Link copied to clipboard

Enables the Braze SDK after an invocation of Braze.disableSdk. Note that the Braze SDK is enabled by default.

Link copied to clipboard
fun getApiEndpoint(brazeEndpoint: Uri): Uri

If an IBrazeEndpointProvider is configured, that provider's delegate is used to generate the Uri for the Braze API endpoint. Otherwise, return the Uri given.

Link copied to clipboard

A helper method to determine if the SDK is configured with an API key. Note that the SDK should not be called without a configured API key under any circumstances.

Link copied to clipboard

Static method that returns the Braze singleton. All requests to Braze are made through this instance.

Link copied to clipboard

Sets an IBrazeEndpointProvider to be used to route Braze API traffic

Link copied to clipboard
fun wipeData(context: Context)

Hard resets all data created by the Braze SDK from the internal storage directory. Note that any in-flight actions such as event logging, data syncing, etc. will be cancelled as a result of this call.

Properties

Link copied to clipboard

A custom IBrazeNotificationFactory to be used to modify or create Braze push notifications.

Link copied to clipboard

Returns whether the SDK is disabled when either:

Link copied to clipboard

Pauses or resumes outbound network requests from the Braze SDK at any point during runtime. Events are not lost during the offline state. Manual requests made from the Braze singleton will also be offline. Single shot requests in offline mode, (such as templating, image, and file requests) are lost and will not be repeated later. Basically, everything that is not an event logged to a session will be lost.