class TeakNotification

Interface for manipulating notifications from Teak.

Methods

ToString

Returns a string that represents the current object.

override string ToString();

Return

A string that represents the current object.

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 StartCoroutine.

Parameters

Name Description

scheduleName

A value used to identify the message creative in the Teak CMS e.g. "daily_bonus".

defaultMessage

The text to use in the notification if there are no modifications in the Teak CMS.

delayInSeconds

The number of seconds from the current time before the notification should be sent.

callback

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 StartCoroutine.

Parameters

Name Description

scheduleName

The name of the existing schedule to send in the Teak CMS e.g. "daily_bonus"

delayInSeconds

The number of seconds from the current time before the notification should be sent.

userIds

An array of user ids to which the notification should be delivered.

callback

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 StartCoroutine.

Parameters

Name Description

scheduleId

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.

callback

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 StartCoroutine.

Parameters

Name Description

callback

The callback to be called after notifications are canceled.

Properties

Name Type Description Access

Incentivized

bool

true if the notification was incentivized, false otherwise.

Get/Set

ScheduleName

string

The name of the schedule for the notification on the Teak Dashboard, or null if it was not a scheduled notification.

Get/Set

ScheduleId

ulong

The id of the schedule in the Teak CMS, or null if it was not a scheduled notification.

Get/Set

CreativeName

string

The name of the notification on the Teak Dashboard.

Get/Set

CreativeId

ulong

The id of the notification in the Teak CMS.

Get/Set

ChannelName

string

The name of the Teak 'channel', one of: ios_push, android_push, fb_a2u, email, generic_link.

Get/Set

RewardId

string

Opaque reward identifier, or null if no reward.

Get/Set

DeepLink

string

The complete deep link URL, or null if there was no deep link.

Get/Set