Companion

object Companion

Properties

Link copied to clipboard
Link copied to clipboard
const val SDK_VERSION_NAME: String

Functions

Link copied to clipboard
@MainThread
@JvmStatic
@JvmOverloads
fun configure(context: Context, config: SFMCSdkModuleConfig, listener: InitializationListener? = null)

Initializes the SDK with the provided SFMCSdkModuleConfig. Once complete, the InitializationListener will be notified.
Any subsequent calls to this method will be ignored as long as the values provided in SFMCSdkModuleConfig are the same.
Note: Anyone that calls requestSdk before or during the initialization will be notified before the InitializationListener will be notified.

Link copied to clipboard
@JvmStatic
fun flush()

Schedules a flush of all queued events. The flush is subject to SDK guardrails — notably, a 60-second throttling period between consecutive flush calls. If a flush was recently performed, the request will be deferred until the throttle window has elapsed.

Link copied to clipboard
@JvmStatic
fun requestSdk(listener: SFMCSdkReadyListener)

An asynchronous request for a instance of SFMCSdk.

Link copied to clipboard
@JvmStatic
fun sendImmediate(event: Event)

Tracks an Event at high priority and schedules it to be sent to the server along with any other pending events in the queue. Unlike track, this attempts to deliver queued events promptly rather than waiting for the next scheduled delivery.

Link copied to clipboard
@JvmStatic
fun setLogging(level: LogLevel, listener: LogListener?, vararg modules: ModuleLogger)

Enable/Disable Logging in the SFMCSdk.

Link copied to clipboard
@JvmStatic
fun track(vararg events: Event?)

Tracks one or more Events. Events are dispatched to all registered SDK modules.