class TeakNotification
Interface for manipulating notifications from Teak.
Static Methods
ScheduleNotification
Please use Teak.Notification.Schedule instead. |
Schedule a notification to send to the logged in user for a future time.
IEnumerator ScheduleNotification(string scheduleName,
string defaultMessage,
long delayInSeconds,
System.Action<Reply> callback);
The maximum delay for scheduling a notification is 30 days. |
All notification related methods are coroutines. Unless you want the method to block execution, you must use |
Parameters
Name | Description |
---|---|
|
A value used to identify the message creative in the Teak CMS e.g. "daily_bonus". |
|
The text to use in the notification if there are no modifications in the Teak CMS. |
|
The number of seconds from the current time before the notification should be sent. |
|
The callback to be called after the notification is scheduled. |
ScheduleNotification
Schedule a 'long distance notification'
IEnumerator ScheduleNotification(string scheduleName,
long delayInSeconds,
string[] userIds,
System.Action<Reply> callback);
A notification which is scheduled from code, but delivered to a different player beside the current player is called a "long distance notification".
The maximum delay for scheduling a notification is 30 days. |
All notification related methods are coroutines. Unless you want the method to block execution, you must use |
Parameters
Name | Description |
---|---|
|
The name of the existing schedule to send in the Teak CMS e.g. "daily_bonus" |
|
The number of seconds from the current time before the notification should be sent. |
|
An array of user ids to which the notification should be delivered. |
|
The callback to be called after the notification is scheduled. |
CancelScheduledNotification
Cancel a previously scheduled notification.
IEnumerator CancelScheduledNotification(string scheduleId,
System.Action<Reply> callback);
All notification related methods are coroutines. Unless you want the method to block execution, you must use |
Parameters
Name | Description |
---|---|
|
Passing the id received from ScheduleNotification() will cancel that specific notification; passing the scheduleName used to schedule the notification will cancel all scheduled notifications with that creative id for the user. |
|
The callback to be called after the notification is canceled. |
CancelAllScheduledNotifications
Cancel all previously scheduled notifications for the current user.
IEnumerator CancelAllScheduledNotifications(System.Action<Reply> callback);
All notification related methods are coroutines. Unless you want the method to block execution, you must use |
Properties
Name | Type | Description | Access |
---|---|---|---|
|
|
Get/Set |
|
|
The name of the schedule for the notification on the Teak Dashboard, or |
Get/Set |
|
|
The id of the schedule in the Teak CMS, or |
Get/Set |
|
|
The name of the notification on the Teak Dashboard. |
Get/Set |
|
|
The id of the notification in the Teak CMS. |
Get/Set |
|
|
The name of the Teak 'channel', one of: |
Get/Set |
|
|
Opaque reward identifier, or |
Get/Set |
|
|
The complete deep link URL, or |
Get/Set |