public final class

MarketingCloudSdk

com.salesforce.marketingcloud.MarketingCloudSdk

Summary

Nested Classes
interface MarketingCloudSdk.InitializationListener Returns an instance of InitializationStatus when the initialization of MarketingCloudSdk has completed. 
interface MarketingCloudSdk.WhenReadyListener Returns a valid instance of MarketingCloudSdk when it is ready. 
Public Methods
AnalyticsManager getAnalyticsManager()
InAppMessageManager getInAppMessageManager()
InboxMessageManager getInboxMessageManager()
InitializationStatus getInitializationStatus()
static MarketingCloudSdk getInstance()
Returns an instance of the MarketingCloudSdk.
static int getLogLevel()
MarketingCloudConfig getMarketingCloudConfig()
Returns the MarketingCloudConfig instance used to initialize the MarketingCloudSdk.
NotificationManager getNotificationManager()
PushMessageManager getPushMessageManager()
RegionMessageManager getRegionMessageManager()
RegistrationManager getRegistrationManager()
JSONObject getSdkState()
static int getSdkVersionCode()
static String getSdkVersionName()
static void init(Context context, MarketingCloudConfig config, MarketingCloudSdk.InitializationListener listener)
Initializes the SDK with the provided config.
static boolean isInitializing()
Indicates whether the sdk is currently executing its initialization routine.
static boolean isReady()
Indicates whether or not there is a valid instance of MarketingCloudSdk that is ready(initialized) to be used.
static void requestSdk(MarketingCloudSdk.WhenReadyListener listener)
An asynchronous request for an instance of MarketingCloudSdk.
static void requestSdk(Looper looper, MarketingCloudSdk.WhenReadyListener listener)
An asynchronous request for a instance of MarketingCloudSdk.
static void setLogLevel(int level)
static void setLogListener(MCLogListener logListener)
static void unregisterWhenReadyListener(MarketingCloudSdk.WhenReadyListener listener)
Prevents a MarketingCloudSdk.WhenReadyListener from returning an instance of MarketingCloudSdk

Public Methods

public AnalyticsManager getAnalyticsManager ()

public InAppMessageManager getInAppMessageManager ()

public InboxMessageManager getInboxMessageManager ()

public InitializationStatus getInitializationStatus ()

public static MarketingCloudSdk getInstance ()

Returns an instance of the MarketingCloudSdk. An IllegalStateException will be thrown if this method is called before init.
Note: This method will block the calling thread if init has not finished.

public static int getLogLevel ()

public MarketingCloudConfig getMarketingCloudConfig ()

Returns the MarketingCloudConfig instance used to initialize the MarketingCloudSdk.

public NotificationManager getNotificationManager ()

public PushMessageManager getPushMessageManager ()

public RegionMessageManager getRegionMessageManager ()

public RegistrationManager getRegistrationManager ()

public JSONObject getSdkState ()

public static int getSdkVersionCode ()

public static String getSdkVersionName ()

public static void init (Context context, MarketingCloudConfig config, MarketingCloudSdk.InitializationListener listener)

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

public static boolean isInitializing ()

Indicates whether the sdk is currently executing its initialization routine.

public static boolean isReady ()

Indicates whether or not there is a valid instance of MarketingCloudSdk that is ready(initialized) to be used. If the value is true then calls to getInstance() will not block the thread.

public static void requestSdk (MarketingCloudSdk.WhenReadyListener listener)

An asynchronous request for an instance of MarketingCloudSdk.

Parameters
listener Callback to be called after init has completed successfully.

public static void requestSdk (Looper looper, MarketingCloudSdk.WhenReadyListener listener)

An asynchronous request for a instance of MarketingCloudSdk.

Parameters
looper Used for the callback.
listener Callback to be called after init has completed successfully.

public static void setLogLevel (int level)

public static void setLogListener (MCLogListener logListener)

public static void unregisterWhenReadyListener (MarketingCloudSdk.WhenReadyListener listener)

Prevents a MarketingCloudSdk.WhenReadyListener from returning an instance of MarketingCloudSdk

Parameters
listener Callback to be removed