public class Respoke
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
Respoke.TaskCompletionListener
A listener interface to allow the receiver to be notified of the success or failure of an asynchronous operation
|
Modifier and Type | Field and Description |
---|---|
static int |
GUID_STRING_LENGTH |
Modifier and Type | Method and Description |
---|---|
void |
clientConnected(RespokeClient client)
Notify the shared SDK instance that the specified client has connected.
|
RespokeClient |
createClient(android.content.Context appContext)
This is one of two possible entry points for interacting with the library.
|
static java.lang.String |
makeGUID()
Create a globally unique identifier for naming instances
|
static void |
postTaskError(Respoke.TaskCompletionListener completionListener,
java.lang.String errorMessage)
A helper function to post an error message to a TaskCompletionListener on the UI thread
|
static void |
postTaskSuccess(Respoke.TaskCompletionListener completionListener)
A helper function to post success to a TaskCompletionListener on the UI thread
|
void |
registerPushToken(java.lang.String token)
Notify the Respoke SDK that this device should register itself for push notifications
|
static Respoke |
sharedInstance()
Retrieve the globally shared instance of the Respoke SDK
|
void |
unregisterClient(RespokeClient client)
Unregister a client that is no longer active so that it's resources can be
deallocated
|
void |
unregisterPushServices(Respoke.TaskCompletionListener completionListener)
Unregister this device from the Respoke push notification service and stop any future notifications until it is re-registered
|
public static final int GUID_STRING_LENGTH
public static void postTaskSuccess(Respoke.TaskCompletionListener completionListener)
completionListener
- The TaskCompletionListener to notifypublic static void postTaskError(Respoke.TaskCompletionListener completionListener, java.lang.String errorMessage)
completionListener
- The TaskCompletionListener to notifyerrorMessage
- The error message to postpublic static Respoke sharedInstance()
public RespokeClient createClient(android.content.Context appContext)
public void unregisterClient(RespokeClient client)
client
- The client to unregisterpublic static java.lang.String makeGUID()
public void registerPushToken(java.lang.String token)
token
- The token that identifies the device to GCMS.public void unregisterPushServices(Respoke.TaskCompletionListener completionListener)
completionListener
- A listener to be notified of the success of the asynchronous unregistration operationpublic void clientConnected(RespokeClient client)
client
- The client that just connected