Loading...
Searching...
No Matches
PushNotifications::Channel Struct Reference

Android API level 26 or higher only: Represents notification channel through which notifications will be sent. More...

#include <juce_PushNotifications.h>

Public Types

enum  Importance {
  none , min , low , normal ,
  high , max
}
 Controls how interruptive the notification posted on this channel are. More...
 

Public Attributes

String identifier
 Required: Unique channel identifier.
 
String name
 Required: User facing name of the channel.
 
Importance importance = normal
 Required.
 
Notification::LockScreenAppearance lockScreenAppearance = Notification::showPartially
 Optional.
 
String description
 Optional: user visible description of the channel.
 
String groupId
 Required: group this channel belongs to (see ChannelGroup).
 
Colour ledColour
 Optional: sets the led colour for notifications in this channel.
 
bool bypassDoNotDisturb = false
 Optional: true if notifications in this channel can bypass do not disturb setting.
 
bool canShowBadge = false
 Optional: true if notifications in this channel can show badges in a Launcher application.
 
bool enableLights = false
 Optional: true if notifications in this channel should show lights (subject to hardware support).
 
bool enableVibration = false
 Optional: true if notifications in this channel should trigger vibrations.
 
URL soundToPlay
 Optional: sound to play in this channel.
 
Array< int > vibrationPattern
 Optional: vibration pattern for this channel.
 

Detailed Description

Android API level 26 or higher only: Represents notification channel through which notifications will be sent.

Starting from Android API level 26, you should call setupChannels() at the start of your application, before posting any notifications. Then, when sending notifications, assign a channel to each created notification.

Member Enumeration Documentation

◆ Importance

Controls how interruptive the notification posted on this channel are.

Enumerator
none 
min 
low 
normal 
high 
max 

Member Data Documentation

◆ identifier

String PushNotifications::Channel::identifier

Required: Unique channel identifier.

◆ name

String PushNotifications::Channel::name

Required: User facing name of the channel.

◆ importance

Importance PushNotifications::Channel::importance = normal

Required.

◆ lockScreenAppearance

Notification::LockScreenAppearance PushNotifications::Channel::lockScreenAppearance = Notification::showPartially

◆ description

String PushNotifications::Channel::description

Optional: user visible description of the channel.

◆ groupId

String PushNotifications::Channel::groupId

Required: group this channel belongs to (see ChannelGroup).

◆ ledColour

Colour PushNotifications::Channel::ledColour

Optional: sets the led colour for notifications in this channel.

◆ bypassDoNotDisturb

bool PushNotifications::Channel::bypassDoNotDisturb = false

Optional: true if notifications in this channel can bypass do not disturb setting.

◆ canShowBadge

bool PushNotifications::Channel::canShowBadge = false

Optional: true if notifications in this channel can show badges in a Launcher application.

◆ enableLights

bool PushNotifications::Channel::enableLights = false

Optional: true if notifications in this channel should show lights (subject to hardware support).

◆ enableVibration

bool PushNotifications::Channel::enableVibration = false

Optional: true if notifications in this channel should trigger vibrations.

◆ soundToPlay

URL PushNotifications::Channel::soundToPlay

Optional: sound to play in this channel.

See Notification::soundToPlay for more info.

◆ vibrationPattern

Array<int> PushNotifications::Channel::vibrationPattern

Optional: vibration pattern for this channel.

See Notification::vibrationPattern for more info.


The documentation for this struct was generated from the following file:
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram