The sample demonstrating using various features of UTNotifications.
More...
|
ValidatedInputField | DemoServerURLInputField |
|
Text | NotifyAllText |
|
Text | InitializeText |
|
Toggle | NotificationsEnabledToggle |
|
CreateNotificationDialog | CreateNotificationDialog |
|
NotificationDetailsDialog | NotificationDetailsDialog |
|
The sample demonstrating using various features of UTNotifications.
◆ Buttons()
List<Button> UTNotifications.UTNotificationsSample.Buttons |
( |
bool |
hasButtons | ) |
|
|
protected |
Optionally generates Android notification buttons.
◆ Cancel()
void UTNotifications.UTNotificationsSample.Cancel |
( |
int |
id | ) |
|
Cancels the notification with the specified ID (ignored if the specified notification is not found).
- See also
- UTNotifications.Manager.CancelNotification
If the specified notification is scheduled or repeating all the future shows will be also canceled.
- Parameters
-
id | ID of the notification to cancel. |
◆ CancelAll()
void UTNotifications.UTNotificationsSample.CancelAll |
( |
| ) |
|
◆ CreateLocalNotification()
void UTNotifications.UTNotificationsSample.CreateLocalNotification |
( |
| ) |
|
◆ Hide()
void UTNotifications.UTNotificationsSample.Hide |
( |
int |
id | ) |
|
Hides the notification with the specified ID (ignored if the specified notification is not found).
- See also
- UTNotifications.Manager.HideNotification
If the specified notification is scheduled or repeating, all the future shows will remain scheduled. Not supported and will be ignored on Windows Store/Universal Windows Platform.
- Parameters
-
id | ID of the notification to hide. |
◆ IncrementBadge()
void UTNotifications.UTNotificationsSample.IncrementBadge |
( |
| ) |
|
◆ Initialize()
void UTNotifications.UTNotificationsSample.Initialize |
( |
| ) |
|
◆ NotifyAll() [1/2]
void UTNotifications.UTNotificationsSample.NotifyAll |
( |
| ) |
|
Requests UTNotifications DemoServer to push a user defined notification to all its registered devices.
◆ NotifyAll() [2/2]
IEnumerator UTNotifications.UTNotificationsSample.NotifyAll |
( |
string |
title, |
|
|
string |
text, |
|
|
int |
id, |
|
|
string |
notificationProfile, |
|
|
int |
badgeNumber |
|
) |
| |
Sends a "notify" request to DemoServer to push a specified notification to all its registered devices. See also Assets/UTNotifications/Editor/DemoServer/src/main/java/com/universal_tools/demoserver/PushNotificator.java.
- Parameters
-
title | Notification title |
text | Notification text |
id | The notification ID (any notifications with the same id will be replaced by this one). - See also
- UTNotifications.Manager.CancelNotification, UTNotifications.Manager.HideNotification
|
notificationProfile | (Optional) The name of the notification profile (sound, icon and other notification attributes). |
badgeNumber | (Optional) The badge number, to be displayed on top of application icon, when supported. Use -1 (default) to keep previous value, 0 to hide the badge. |
- Returns
- IEnumerator to be run as a coroutine.
◆ OnNotificationClicked()
void UTNotifications.UTNotificationsSample.OnNotificationClicked |
( |
ReceivedNotification |
notification | ) |
|
|
protected |
◆ OnNotificationsEnabledToggleValueChanged()
void UTNotifications.UTNotificationsSample.OnNotificationsEnabledToggleValueChanged |
( |
bool |
value | ) |
|
◆ OnNotificationsReceived()
void UTNotifications.UTNotificationsSample.OnNotificationsReceived |
( |
IList< ReceivedNotification > |
receivedNotifications | ) |
|
|
protected |
◆ ScheduleLocalNotification()
void UTNotifications.UTNotificationsSample.ScheduleLocalNotification |
( |
| ) |
|
Schedules the system to post a user defined notification in 30 seconds once. <seealso cref="UTNotifications.Manager.ScheduleNotification
Please note, that with the default settings, you can't see any notifications while the app is running in foreground. It can be changed for Android in UTNotifications settings.
◆ ScheduleRepeatingLocalNotification()
void UTNotifications.UTNotificationsSample.ScheduleRepeatingLocalNotification |
( |
| ) |
|
Schedules the system to post a user defined notification in 10 seconds and then show it every 25 seconds until it's cancelled.
- See also
- UTNotifications.Manager.ScheduleNotificationRepeating
Please note, that with the default settings, you can't see any notifications while the app is running in foreground. It can be changed for Android in UTNotifications settings.
◆ SendRegistrationId() [1/2]
void UTNotifications.UTNotificationsSample.SendRegistrationId |
( |
string |
providerName, |
|
|
string |
registrationId |
|
) |
| |
|
protected |
◆ SendRegistrationId() [2/2]
IEnumerator UTNotifications.UTNotificationsSample.SendRegistrationId |
( |
string |
userId, |
|
|
string |
providerName, |
|
|
string |
registrationId |
|
) |
| |
|
protected |
Sends the unique device push notifications registrationId to DemoServer in a coroutine. See also Assets/UTNotifications/Editor/DemoServer/src/main/java/com/universal_tools/demoserver/Registrator.java.
◆ UserData()
Dictionary<string, string> UTNotifications.UTNotificationsSample.UserData |
( |
bool |
hasImage | ) |
|
|
protected |
Generates a sample user data dictionary, which optionally might define an image to be shown in an Android notification.
◆ Instance
The documentation for this class was generated from the following file:
- Assets/UTNotifications/Sample/UTNotificationsSample.cs