class TeakNotification

An app-to-user notification received from Teak via GCM.

Static Attributes

Name Type Description

TEAK_NOTIFICATION_OPENED_INTENT_ACTION_SUFFIX

final String

The Intent action sent by Teak when a notification has been opened by the user.

TEAK_NOTIFICATION_CLEARED_INTENT_ACTION_SUFFIX

final String

The Intent action sent by Teak when a notification has been cleared by the user.

Methods

getExtras

Get optional extra data associated with this notification.

JSONObject getExtras();

Return

JSONObject containing extra data sent by the server.

Static Methods

scheduleNotification

Use Teak.Notification#schedule(String, long, Map) instead.

Schedules a push notification for some time in the future.

FutureTask<String> scheduleNotification(final String creativeId,
                                              final String defaultMessage,
                                              final long delayInSeconds);

Return

The identifier of the scheduled notification (see TeakNotification#cancelNotification(String) or null.

Parameters

Name Description

creativeId

The identifier of the notification in the Teak dashboard (will create if not found).

defaultMessage

The default message to send, may be over-ridden in the dashboard.

delayInSeconds

The delay in seconds from now to send the notification.

scheduleNotification

Schedules a push notification, to be delivered to other users, for some time in the future.

FutureTask<String> scheduleNotification(final String creativeId,
                                              final long delayInSeconds,
                                              final String[] userIds);

Return

The identifiers of the scheduled notifications (see TeakNotification#cancelNotification(String) or null.

Parameters

Name Description

creativeId

The identifier of the notification in the Teak dashboard, this must already exist.

delayInSeconds

The delay in seconds from now to send the notification.

userIds

A list of game-assigned user ids to deliver the notification to.

cancelNotification

Cancel a push notification that was scheduled with TeakNotification#scheduleNotification(String, String, long).

FutureTask<String> cancelNotification(final String scheduleId);

Return

The status of the operation

Parameters

Name Description

scheduleId

cancelAll

Cancel all scheduled push notifications for the logged in user.

FutureTask<String> cancelAll();

Return

A list containing the ids of all scheduled notifications.