Beamable SDK
|
This type defines the Client main entry point for the Notifications feature. More...
Public Member Functions | |
delegate void | InGameNotificationCB (string notificationKey, string message) |
void | RegisterForNotifications () |
Register for remote and local notifications More... | |
void | Subscribe< T > (string name, Action< T > callback) |
Register a callback handler for notifications. These callbacks will be triggered anytime an event with same name is sent to the Publish method. More... | |
void | Subscribe (string name, Action< object > callback) |
Register a callback handler for push notifications. More... | |
void | Unsubscribe (string name, Action< object > handler) |
Unregister a callback handler for a notification. More... | |
void | Unsubscribe< T > (string name, Action< T > handler) |
Unregister a callback handler for a notification. More... | |
void | Publish (string name, object payload) |
Trigger the callbacks for a given notification. More... | |
void | ScheduleInGameNotification (string key, string message, TimeSpan timeFromNow, InGameNotificationCB callback) |
void | CancelInGameNotification (string key) |
void | RemoveAllInGameNotifications () |
void | Update () |
void | CreateNotificationChannel (string id, string name, string description) |
Create a notification channel. More... | |
void | ScheduleLocalNotification (string channel, string key, int trackingId, string title, string message, TimeSpan timeFromNow, bool restrictTime, Dictionary< string, string > customData=null) |
Schedule a local notification. This will overwrite any previous notification with the same key that may exist. More... | |
void | CancelLocalNotification (string key) |
Cancel a pending local notification that has not yet been shown. More... | |
Static Public Attributes | |
const int | MaxLocalNotifications = 25 |
This type defines the Client main entry point for the Notifications feature.
|
inline |
Cancel an in-game notification.
key | an arbitrary identifier for this notification |
|
inline |
Cancel a pending local notification that has not yet been shown.
key | String key identifying the notification. |
|
inline |
Create a notification channel.
id | Identifier of the notification channel. |
name | Arbitrary identifier that can be used to cancel the notification. |
description | Arbitrary ID used for analytics. |
Implements Beamable.Common.Api.Notifications.INotificationService.
|
inline |
Trigger the callbacks for a given notification.
name | The event name to publish |
payload | The data to to make available to all subscribers |
Implements Beamable.Common.Api.Notifications.INotificationService.
|
inline |
Register for remote and local notifications
Implements Beamable.Common.Api.Notifications.INotificationService.
|
inline |
Schedule an in-game notification. If an existing notification is found, then it will be replaced. Use this method to schedule an notification 1971 seconds from now. Note that In game notifications don't persist after game restarts.
key | an arbitrary identifier for this notification that is used for cancelling later |
timeFromNow | The amount of time into the future to fire this notification |
|
inline |
Schedule a local notification. This will overwrite any previous notification with the same key that may exist.
channel | Identifier of the notification channel. |
key | Arbitrary identifier that can be used to cancel the notification. |
trackingId | Arbitrary ID used for analytics. |
title | The title of the action button or slider. |
message | The message body text. |
timeFromNow | How long before the notification should appear. |
restrictTime | If true the notification will be placed inside the restricted time window. |
customData | Optional list of custom data to store in the notification for later use. |
Implements Beamable.Common.Api.Notifications.INotificationService.
|
inline |
Register a callback handler for push notifications.
name | The event name to receive a callback on |
callback | The callback to invoke when the event is received |
Implements Beamable.Common.Api.Notifications.INotificationService.
|
inline |
Register a callback handler for notifications. These callbacks will be triggered anytime an event with same name is sent to the Publish method.
Implements Beamable.Common.Api.Notifications.INotificationService.
|
inline |
Unregister a callback handler for a notification.
name | The event name to remove a callback handler from. |
handler | The same instance of the callback that was registered with the Subscribe method. |
Implements Beamable.Common.Api.Notifications.INotificationService.
|
inline |
Unregister a callback handler for a notification.
Implements Beamable.Common.Api.Notifications.INotificationService.