public final class SupportKit
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
destroy()
Terminate the SupportKit facilities.
|
static Conversation |
getConversation()
Accessor method for the current conversation.
|
static java.lang.String |
getGoogleCloudMessagingProjectId()
Accessor method to get the Google Cloud Messaging project id that was
linked to the application via the Web portal.
|
static InitializationStatus |
getInitializationStatus()
Accessor method for the current AppBoot status.
|
static Settings |
getSettings()
Accessor method for the SDK settings.
|
static void |
init(android.app.Application application,
Settings settings)
Initialize the SupportKit SDK with the provided settings.
|
static void |
init(android.app.Application application,
java.lang.String appToken)
Convenient method to initialize the SupportKit SDK using the default settings.
|
static void |
login(java.lang.String userId,
java.lang.String jwt)
Logs in a new SupportKit user.
|
static void |
logout()
Logs out the current user.
|
static void |
setGoogleCloudMessagingToken(java.lang.String token)
Method used to register the Google Cloud Messaging token to SupportKit
|
static void |
track(java.lang.String eventName)
Tracks an app event, and processes any whispers associated with that event.
|
public static void init(android.app.Application application, java.lang.String appToken)
SupportKit.init(Context, Settings)
application
- The ApplicationappToken
- The app tokenpublic static void init(android.app.Application application, Settings settings)
SupportKit.getSettings()
to retrieve and modify the given settings object.application
- The Applicationsettings
- The settings to usepublic static void login(java.lang.String userId, java.lang.String jwt)
userId
- The distinct id of the user to login. Must not be null.jwt
- Optional jwt used to prove the origin of the login request. May be null.public static void logout()
public static void destroy()
public static Settings getSettings()
init(Application, Settings)
, or null if SupportKit hasn't been initialized yet.public static Conversation getConversation()
public static InitializationStatus getInitializationStatus()
public static java.lang.String getGoogleCloudMessagingProjectId()
public static void setGoogleCloudMessagingToken(java.lang.String token)
token
- The Google Cloud Messaging tokenpublic static void track(java.lang.String eventName)
eventName
- The name of the event to track. This should match a whisper created on the admin panel for your app.