Struct AndroidNotification
The AndroidNotification is used schedule a local notification, which includes the content of the notification.
Inherited Members
Namespace: Unity.Notifications.Android
Assembly: solution.dll
Syntax
public struct AndroidNotification
Constructors
| Name | Description |
|---|---|
| AndroidNotification(string, string, DateTime) | Create a notification struct with all optional fields set to default values. |
| AndroidNotification(string, string, DateTime, TimeSpan) | Create a repeatable notification struct with all optional fields set to default values. |
| AndroidNotification(string, string, DateTime, TimeSpan, string) | Create a notification struct with a custom small icon and all optional fields set to default values. |
Properties
| Name | Description |
|---|---|
| BigPicture | The necessary properties for big picture style notification. For convenience, assigning this property will also set the Style property. |
| Color | Accent color to be applied by the standard style templates when presenting this notification. The template design constructs a colorful header image by overlaying the icon image (stenciled in white) atop a field of this color. Alpha components are ignored. |
| CustomTimestamp | Set this to show custom date instead of the notification's "FireTime" as the notification's timestamp'. |
| FireTime | The date and time when the notification should be delivered. |
| Group | Set this property for the notification to be made part of a group of notifications sharing the same key. Grouped notifications may display in a cluster or stack on devices which support such rendering. Only available on Android 7.0 (API level 24) and above. |
| GroupAlertBehaviour | Sets the group alert behavior for this notification. Set this property to mute this notification if alerts for this notification's group should be handled by a different notification. This is only applicable for notifications that belong to a group. This must be set on all notifications you want to mute. Only available on Android 8.0 (API level 26) and above. |
| GroupSummary | Set this notification to be the group summary for a group of notifications. Requires the 'Group' property to also be set. Grouped notifications may display in a cluster or stack on devices which support such rendering. Only available on Android 7.0 (API level 24) and above. |
| IntentData | Use this to save arbitrary string data related to the notification. |
| LargeIcon | Notification large icon.
Add a large icon to the notification content view. This image will be shown on the left of the notification view in place of the small icon (which will be placed in a small badge atop the large icon).
The icon has to be registered in Notification Settings or a PNG file has to be placed in the |
| Number | Sets the number of items this notification represents. Is displayed as a badge count on the notification icon if the launcher supports this behavior. |
| RepeatInterval | The notification will be be repeated on every specified time interval. Do not set for one time notifications. |
| ShouldAutoCancel | This notification will automatically be dismissed when the user touches it. By default this behavior is turned off. |
| ShowInForeground | Set this notification to be shown when app is in the foreground (default: true). |
| ShowTimestamp | Enable it to show a timestamp on the notification when it's delivered, unless the "CustomTimestamp" property is set "FireTime" will be shown. |
| SmallIcon | Notification small icon.
It will be used to represent the notification in the status bar and content view (unless overridden there by a large icon)
The icon has to be registered in Notification Settings or a PNG file has to be placed in the |
| SortKey | The sort key will be used to order this notification among other notifications from the same package. Notifications will be sorted lexicographically using this value. |
| Style | Apply a custom style to the notification. Currently only BigPicture and BigText styles are supported. |
| Text | Notification body. Set the second line of text in the notification. |
| Title | Notification title. Set the first line of text in the notification. |
| UsesStopwatch | Show the notification time field as a stopwatch instead of a timestamp. |