Package com.swrve.sdk
Class SwrveSDK
- java.lang.Object
-
- com.swrve.sdk.SwrveSDKBase
-
- com.swrve.sdk.SwrveSDK
-
public class SwrveSDK extends SwrveSDKBase
-
-
Field Summary
-
Fields inherited from class com.swrve.sdk.SwrveSDKBase
instance
-
-
Constructor Summary
Constructors Constructor Description SwrveSDK()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ISwrve
createInstance(android.app.Application application, int appId, java.lang.String apiKey)
Create a single Swrve SDK instance.static ISwrve
createInstance(android.app.Application application, int appId, java.lang.String apiKey, SwrveConfig config)
Create a single Swrve SDK instance.static SwrveConfig
getConfig()
Returns the Swrve configuration that was used to initialize the SDK.static void
sendPushEngagedEvent(android.content.Context context, java.lang.String pushId)
Called to send the push engaged event to Swrve.static void
setRegistrationId(java.lang.String registrationId)
Update the Huawei registrationId.static void
setSilentPushListener(com.swrve.sdk.SwrveSilentPushListener silentPushListener)
Set the silent push listener.-
Methods inherited from class com.swrve.sdk.SwrveSDKBase
checkInstanceCreated, currencyGiven, embeddedControlMessageImpressionEvent, embeddedMessageButtonWasPressed, embeddedMessageWasShownToUser, event, event, flushToDisk, getApiKey, getAppStoreURLForApp, getCacheDir, getDeviceInfo, getExternalUserId, getInitialisedTime, getInstance, getLanguage, getMessageCenterCampaign, getMessageCenterCampaigns, getMessageCenterCampaigns, getMessageCenterCampaigns, getMessageCenterCampaigns, getPersonalizedEmbeddedMessageData, getPersonalizedText, getRealTimeUserProperties, getResourceManager, getUserId, getUserResources, getUserResourcesDiff, handleDeeplink, handleDeferredDeeplink, iap, iap, identify, isStarted, markMessageCenterCampaignAsSeen, purchase, refreshCampaignsAndResources, removeMessageCenterCampaign, sendQueuedEvents, sessionStart, setCustomPayloadForConversationInput, setLanguage, setResourcesListener, showMessageCenterCampaign, showMessageCenterCampaign, shutdown, start, start, stopTracking, userUpdate, userUpdate
-
-
-
-
Method Detail
-
createInstance
public static ISwrve createInstance(android.app.Application application, int appId, java.lang.String apiKey)
Create a single Swrve SDK instance.- Parameters:
application
- your application contextappId
- your app id in the Swrve dashboardapiKey
- your app api_key in the Swrve dashboard- Returns:
- singleton SDK instance.
-
createInstance
public static ISwrve createInstance(android.app.Application application, int appId, java.lang.String apiKey, SwrveConfig config)
Create a single Swrve SDK instance.- Parameters:
application
- your application contextappId
- your app id in the Swrve dashboardapiKey
- your app api_key in the Swrve dashboardconfig
- your SwrveConfig options- Returns:
- singleton SDK instance.
-
getConfig
public static SwrveConfig getConfig()
Returns the Swrve configuration that was used to initialize the SDK.- Returns:
- configuration used to context the SDK
-
setSilentPushListener
public static void setSilentPushListener(com.swrve.sdk.SwrveSilentPushListener silentPushListener)
Set the silent push listener.- Parameters:
silentPushListener
- silent push listener
-
sendPushEngagedEvent
public static void sendPushEngagedEvent(android.content.Context context, java.lang.String pushId)
Called to send the push engaged event to Swrve.- Parameters:
context
- android contextpushId
- The push id for engagement
-
setRegistrationId
public static void setRegistrationId(java.lang.String registrationId)
Update the Huawei registrationId.- Parameters:
registrationId
- Updated registration Id
-
-