Class PushNotifications
Namespace: Unity.Services.PushNotifications
Syntax
public class PushNotifications : object
Properties
Analytics
Declaration
public static PushNotificationAnalytics Analytics { get; }
Property Value
| Type | Description |
|---|---|
| PushNotificationAnalytics |
Methods
RegisterForPushNotificationsAsync(PushNotificationSettings)
Registers for push notifications with the appropriate mechanism for the current platform.
This method will automatically handle platform specific intricacies of getting a push notification token, and will send the appropriate analytics events to Unity Analytics 2.
Declaration
public static Task<string> RegisterForPushNotificationsAsync(PushNotificationSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| PushNotificationSettings | settings | A PushNotificationSettings object with the settings for the SDK. See the documentation on that class for more information. |
Returns
| Type | Description |
|---|---|
| Task<String> | (Asynchronously via a Task) The device token as a string. |
Events
OnNotificationReceived
Declaration
public static event Action<Dictionary<string, object>> OnNotificationReceived
Event Type
| Type | Description |
|---|---|
| Action<Dictionary<String, Object>> |