MobileAppMessaging

Overview 

The main entry point for the MobileAppMessaging module in the Salesforce Marketing Cloud Unified SDK. This class implements a singleton pattern with asynchronous initialization and component management.

Package: com.salesforce.marketingcloud.mobileappmessaging

Inheritance: MobileAppMessaging : ModuleInterface


Nested Types 

Companion 

1object Companion

Companion object for the MobileAppMessaging class.

InitializationListener 

1fun interface InitializationListener

Functional interface for receiving initialization completion callbacks.

WhenReadyHandler 

1abstract class WhenReadyHandler(
2    looper: Looper?,
3    val listener: MobileAppMessaging.WhenReadyListener
4)

Handler class for processing asynchronous SDK requests.

Parameters:

  • looper - Optional Looper for handler operations
  • listener - The WhenReadyListener callback

WhenReadyListener 

1fun interface WhenReadyListener

Functional interface callback for when the MobileAppMessaging module is ready for use.


Properties 

state 

1open override val state: JSONObject

Provides the current state of the MobileAppMessaging SDK as a JSON object.

Returns: JSONObject containing:

  • Module information
  • Readiness status
  • Initialization configuration
  • Component states
  • Storage manager status
  • Error object if state creation fails

Methods 

getAnalyticsManager 

1fun getAnalyticsManager(): AnalyticsManager

Retrieves the analytics component for managing analytics state.

Returns: AnalyticsManager instance

getRegistrationManager 

1fun getRegistrationManager(): RegistrationManager

Retrieves the registration component for managing device registration.

Returns: RegistrationManager instance

getVersionName 

1fun getVersionName(): String

Gets the version name of the module.

Returns: String representing the module version

Related Classes