MarketingCloudSdk
Package: com.salesforce.marketingcloud
Interfaces: ControlChannel.ControlChannelListener, ModuleInterface
The main SDK class for Salesforce Marketing Cloud Unified SDK. This class provides the primary interface for initializing and interacting with the Marketing Cloud SDK.
An interface that provides an InitializationStatus when SDK initialization completes.
An interface that provides a valid MarketingCloudSdk instance when ready.
Provides access to the analytics management functionality.
Returns the current SDK instance, or null if not initialized.
Indicates whether the SDK is currently in the initialization process.
Indicates whether the SDK has completed initialization and is ready to use.
Initializes the SDK with the provided configuration. Must be called from the main thread.
Parameters:
context- Android application contextconfig- Marketing Cloud configuration objectlistener- Optional callback for initialization completion
Asynchronous request for an SDK instance.
Parameters:
listener- Callback that receives the SDK instance when ready
Asynchronous request for an SDK instance with custom looper.
Parameters:
looper- Custom looper for callback executionlistener- Callback that receives the SDK instance when ready
Prevents a WhenReadyListener from receiving the SDK instance.
Parameters:
listener- The listener to unregister
Returns: The MarketingCloudConfig instance used to initialize the SDK.
Returns: The current initialization status of the SDK.
Returns: The registration manager for device registration operations.
Returns: The inbox message manager for handling inbox messages.
Returns: The region message manager for location-based messaging.
Returns: A JSON object containing the current state of the SDK.
Returns: The version name of the SDK as a string.
Returns: The version code of the SDK as an integer.
Sets the logging level for the SDK.
Parameters:
level- The desired log level
Returns: The current log level.
Sets a custom log listener for SDK logging events.
Parameters:
logListener- Optional custom log listener implementation