![]() |
UTNotifications
1.8
Professional Local & Push Notification Plugin
|
Abstract base class for any notification type: immediate, scheduled, scheduled repeating or push. More...
Public Member Functions | |
Notification (string title, string text, int id) | |
Initializes a new instance of the T:UTNotifications.Notification class. More... | |
Notification (string title, string text, int id, IDictionary< string, string > userData, string notificationProfile, int badgeNumber, ICollection< Button > buttons) | |
Initializes a new instance of the T:UTNotifications.Notification class. More... | |
Notification (JSONNode json) | |
Initializes a new instance of the T:UTNotifications.Notification class. More... | |
virtual JSONClass | ToJson () |
Converts to a notification json. More... | |
Notification | SetUserData (IDictionary< string, string > userData) |
Sets the user data. More... | |
Notification | SetNotificationProfile (string notificationProfile) |
Sets the notification profile. More... | |
Notification | SetBadgeNumber (int badgeNumber) |
Sets the badge number. More... | |
Notification | SetButtons (ICollection< Button > buttons) |
Sets the buttons. More... | |
override string | ToString () |
Returns a T:System.String that represents the current T:UTNotifications.Notification. More... | |
Static Public Member Functions | |
static Notification | FromJson (JSONNode json) |
Factory method to create a T:UTNotifications.Notification object from a notification json. More... | |
Public Attributes | |
const int | BADGE_NOT_SPECIFIED = -1 |
Use instead of a badge number to keep the previous badge number. More... | |
readonly string | title |
The title. More... | |
readonly string | text |
The text. More... | |
readonly int | id |
The id. More... | |
Properties | |
IDictionary< string, string > | userData [get] |
The user data provided by you in Manager.PostLocalNotification , Manager.ScheduleNotification or Manager.ScheduleNotificationRepeating or by your server in a push notification payload. More... | |
string | notificationProfile [get] |
The name of the notification profile (sound, icon and other notification attributes). More... | |
int | badgeNumber [get] |
The badge number (default value is BADGE_NOT_SPECIFIED). More... | |
ICollection< Button > | buttons [get] |
Notification buttons (when supported by the platform). More... | |
Abstract base class for any notification type: immediate, scheduled, scheduled repeating or push.
UTNotifications.Notification.Notification | ( | string | title, |
string | text, | ||
int | id | ||
) |
Initializes a new instance of the T:UTNotifications.Notification class.
title | Title. |
text | Text. |
id | Id. |
UTNotifications.Notification.Notification | ( | string | title, |
string | text, | ||
int | id, | ||
IDictionary< string, string > | userData, | ||
string | notificationProfile, | ||
int | badgeNumber, | ||
ICollection< Button > | buttons | ||
) |
Initializes a new instance of the T:UTNotifications.Notification class.
title | Title. |
text | Text. |
id | Id. |
userData | User data (optional). |
notificationProfile | Notification profile (optional). |
badgeNumber | Badge number. |
buttons | Buttons (optional). |
UTNotifications.Notification.Notification | ( | JSONNode | json | ) |
Initializes a new instance of the T:UTNotifications.Notification class.
json | Notification json. |
|
static |
Factory method to create a T:UTNotifications.Notification object from a notification json.
json | Notification json. |
Notification UTNotifications.Notification.SetBadgeNumber | ( | int | badgeNumber | ) |
Sets the badge number.
badgeNumber | Badge number. |
Notification UTNotifications.Notification.SetButtons | ( | ICollection< Button > | buttons | ) |
Sets the buttons.
buttons | Buttons. |
Notification UTNotifications.Notification.SetNotificationProfile | ( | string | notificationProfile | ) |
Notification UTNotifications.Notification.SetUserData | ( | IDictionary< string, string > | userData | ) |
Sets the user data.
userData | User data. |
|
virtual |
Converts to a notification json.
Reimplemented in UTNotifications.ScheduledRepeatingNotification, UTNotifications.ScheduledNotification, and UTNotifications.PushNotification.
override string UTNotifications.Notification.ToString | ( | ) |
Returns a T:System.String that represents the current T:UTNotifications.Notification.
const int UTNotifications.Notification.BADGE_NOT_SPECIFIED = -1 |
Use instead of a badge number to keep the previous badge number.
readonly int UTNotifications.Notification.id |
The id.
readonly string UTNotifications.Notification.text |
The text.
readonly string UTNotifications.Notification.title |
The title.
|
get |
The badge number (default value is BADGE_NOT_SPECIFIED).
|
get |
Notification buttons (when supported by the platform).
|
get |
The name of the notification profile (sound, icon and other notification attributes).
|
get |
The user data provided by you in Manager.PostLocalNotification
, Manager.ScheduleNotification
or Manager.ScheduleNotificationRepeating
or by your server in a push notification payload.
When the ReceivedNotification is an argument of Manager.OnNotificationClicked event handler, stores the user data of the clicked notification button (if specified). When the notification itself is clicked (even when there are custom buttons), stores the user data of the notification itself.