Struct AndroidNotificationChannel
The wrapper of the Android notification channel. Use this to group notifications by groups.
Inherited Members
Namespace: Unity.Notifications.Android
Assembly: Unity.Notifications.Android.dll
Syntax
public struct AndroidNotificationChannelConstructors
AndroidNotificationChannel(string, string, string, Importance)
Create a notification channel struct with all optional fields set to default values.
Declaration
public AndroidNotificationChannel(string id, string name, string description, Importance importance)Parameters
| Type | Name | Description | 
|---|---|---|
| string | id | ID for the channel | 
| string | name | Channel name | 
| string | description | Channel description | 
| Importance | importance | Importance of the channel | 
Properties
CanBypassDnd
Whether or not notifications posted to this channel can bypass the Do Not Disturb. This can be changed by users in the settings app.
Declaration
public bool CanBypassDnd { readonly get; set; }Property Value
| Type | Description | 
|---|---|
| bool | 
CanShowBadge
Whether notifications posted to this channel can appear as badges in a Launcher application.
Declaration
public bool CanShowBadge { readonly get; set; }Property Value
| Type | Description | 
|---|---|
| bool | 
Description
User visible description of the notification channel.
Declaration
public string Description { readonly get; set; }Property Value
| Type | Description | 
|---|---|
| string | 
EnableLights
Sets whether notifications posted to this channel should display notification lights, on devices that support that feature. This can be changed by users in the settings app.
Declaration
public bool EnableLights { readonly get; set; }Property Value
| Type | Description | 
|---|---|
| bool | 
EnableVibration
Sets whether notification posted to this channel should vibrate. This can be changed by users in the settings app.
Declaration
public bool EnableVibration { readonly get; set; }Property Value
| Type | Description | 
|---|---|
| bool | 
Enabled
Indicates whether a channel is enabled in the Settings app. User can block notifications for the entire app or for individual channels. The Importance of a blocked channel is set to None.
Declaration
public bool Enabled { get; }Property Value
| Type | Description | 
|---|---|
| bool | 
Group
The ID of the registered channel group this channel belongs to.
Declaration
public string Group { readonly get; set; }Property Value
| Type | Description | 
|---|---|
| string | 
Id
Notification channel identifier. Must be specified when scheduling notifications.
Declaration
public string Id { readonly get; set; }Property Value
| Type | Description | 
|---|---|
| string | 
Importance
Importance level which is applied to all notifications sent to the channel. This can be changed by users in the settings app. Android uses importance to determine how much the notification should interrupt the user (visually and audibly). The higher the importance of a notification, the more interruptive the notification will be. The possible importance levels are the following: High: Makes a sound and appears as a heads-up notification. Default: Makes a sound. Low: No sound. None: No sound and does not appear in the status bar.
Declaration
public Importance Importance { readonly get; set; }Property Value
| Type | Description | 
|---|---|
| Importance | 
LockScreenVisibility
Sets whether or not notifications posted to this channel are shown on the lockscreen in full or redacted form. This can be changed by users in the settings app.
Declaration
public LockScreenVisibility LockScreenVisibility { readonly get; set; }Property Value
| Type | Description | 
|---|---|
| LockScreenVisibility | 
Name
Notification channel name which is visible to users.
Declaration
public string Name { readonly get; set; }Property Value
| Type | Description | 
|---|---|
| string | 
VibrationPattern
Sets the vibration pattern for notifications posted to this channel.
Declaration
public long[] VibrationPattern { readonly get; set; }Property Value
| Type | Description | 
|---|---|
| long[] |