|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectes.javocsoft.android.lib.toucan.client.ToucanClient
public class ToucanClient
This is the Toucan client API library main class.
See http://toucan.javocsoft.es for more info.
| Nested Class Summary | |
|---|---|
static class |
ToucanClient.TOUCAN_WORKER_TYPE
The Toucan HTTP worker type. |
| Field Summary | |
|---|---|
static String |
CACHED_REQUEST_FILE_PREFIX
All pending deliveries, when they can not be delivered, are store in cache files. |
static String |
LOG_TAG
|
static String |
NOTIFICATION_MESSAGE_ID
The message notification id key |
static String |
NOTIFICATION_MESSAGE_REF
The message notification reference key |
static String |
NOTIFICATION_MESSAGE_TEXT
The message content key |
static String |
NOTIFICATION_MESSAGE_TS
The message notification timestamp key |
| Method Summary | |
|---|---|
void |
deviceRegistration(String notificationToken,
int externalId,
ResponseCallback callback)
Registers the device with the specified GCM registration token for the application. |
void |
deviceRegistration(String notificationToken,
int externalId,
String installReferral,
ResponseCallback callback)
Registers the device with the specified GCM registration token for the application. |
void |
deviceRegistration(String notificationToken,
ResponseCallback callback)
Registers the device with the specified GCM registration token for the application. |
void |
deviceRegistration(String notificationToken,
String installReferral,
ResponseCallback callback)
Registers the device with the specified GCM registration token for the application. |
void |
doAddTags(List<String> tags,
ResponseCallback callback)
Allows adding tags for the application/deviceId. |
void |
doDeviceUnregister(ResponseCallback callback)
Un-registers a device from server. |
void |
doEnableRegisteredDevice(ResponseCallback callback)
Enables a registered device. |
void |
doListTags(ResponseCallback callback)
Gets the list of tags for the application and device Id. |
void |
doReadACK(android.os.Bundle notificationBundle,
ResponseCallback callback)
Informs to the API that a notification was read. |
void |
doReceivedACK(android.os.Bundle notificationBundle,
ResponseCallback callback)
Informs to the API that a notification was received. |
void |
doRemoveTags(List<String> tags,
ResponseCallback callback)
Removes the specified tags for the application and deviceId. |
void |
doResetTags(List<String> tags,
ResponseCallback callback)
Deletes current application/DeviceId tags setting the specified tags. |
static ToucanClient |
getInstance(android.content.Context context,
String apiToken,
String appPublicKey)
Gets the instance of the Toucan client. |
void |
informExternalId(int externalId,
ResponseCallback callback)
Informs to the API about the external id. |
void |
informInstallReferral(String installReferral,
ResponseCallback callback)
Informs to the API the installation referral. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String LOG_TAG
public static final String CACHED_REQUEST_FILE_PREFIX
public static final String NOTIFICATION_MESSAGE_TEXT
public static final String NOTIFICATION_MESSAGE_REF
public static final String NOTIFICATION_MESSAGE_ID
public static final String NOTIFICATION_MESSAGE_TS
| Method Detail |
|---|
public static ToucanClient getInstance(android.content.Context context,
String apiToken,
String appPublicKey)
context - apiToken - appPublicKey - deviceNotificationToken -
public void deviceRegistration(String notificationToken,
ResponseCallback callback)
notificationToken - The GCM notification token.callback - A callback to run when operation finishes.
public void deviceRegistration(String notificationToken,
int externalId,
ResponseCallback callback)
notificationToken - The GCM notification token.externalId - An external id that links GCM with some kind of internal back-end.callback - A callback to run when operation finishes.
public void deviceRegistration(String notificationToken,
String installReferral,
ResponseCallback callback)
notificationToken - The GCM notification token.installReferral - The installation referral data.callback - A callback to run when operation finishes.
public void deviceRegistration(String notificationToken,
int externalId,
String installReferral,
ResponseCallback callback)
notificationToken - The GCM notification token.externalId - An external id that links GCM with some kind of internal back-end.installReferral - The installation referral data.callback - A callback to run when operation finishes.
public void informInstallReferral(String installReferral,
ResponseCallback callback)
installReferral - The installation referral data.callback - A callback to run when operation finishes.
public void informExternalId(int externalId,
ResponseCallback callback)
externalId - The external id.callback - A callback to run when operation finishes.
public void doReceivedACK(android.os.Bundle notificationBundle,
ResponseCallback callback)
notificationBundle - Registers the device with the specified
GCM registration token for the application.callback - A callback to run when operation finishes.
public void doReadACK(android.os.Bundle notificationBundle,
ResponseCallback callback)
notificationBundle - Registers the device with the specified
GCM registration token for the application.callback - A callback to run when operation finishes.
public void doAddTags(List<String> tags,
ResponseCallback callback)
tags - A list of tags.callback - A callback to run when operation finishes.
public void doResetTags(List<String> tags,
ResponseCallback callback)
tags - tags to add.callback - A callback to run when operation finishes.
public void doRemoveTags(List<String> tags,
ResponseCallback callback)
tags - A list of tags to remove.callback - A callback to run when operation finishes.public void doListTags(ResponseCallback callback)
callback - A callback to run when operation finishes.public void doDeviceUnregister(ResponseCallback callback)
callback - A callback to run when operation finishes.public void doEnableRegisteredDevice(ResponseCallback callback)
callback - A callback to run when operation finishes.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||