60 bool isValid()
const noexcept;
88 bool triggerInBackground =
false;
89 bool destructive =
false;
157 double triggerIntervalSec = 0.;
189 bool indeterminate =
false;
249 bool groupSummary =
false;
273 bool shouldAutoCancel =
true;
275 bool localOnly =
true;
278 bool ongoing =
false;
283 bool alertOnlyOnce =
false;
305 BadgeIconType badgeIconType = large;
317 GroupAlertBehaviour groupAlertBehaviour = alertAll;
319 int timeoutAfterMs = 0;
400 bool sendDismissAction =
false;
403 bool allowSound =
false;
404 bool allowAlert =
false;
405 bool allowBadge =
false;
423 void requestPermissionsWithSettings (
const Settings& settings);
438 void requestSettingsUsed();
468 bool bypassDoNotDisturb =
false;
469 bool canShowBadge =
false;
470 bool enableLights =
false;
471 bool enableVibration =
false;
499 void getPendingLocalNotifications()
const;
502 void removePendingLocalNotification (
const String& identifier);
505 void removeAllPendingLocalNotifications();
511 bool areNotificationsEnabled()
const;
518 void sendLocalNotification (
const Notification& notification);
527 void getDeliveredNotifications()
const;
532 void removeDeliveredNotification (
const String& identifier);
535 void removeAllDeliveredNotifications();
542 String getDeviceToken()
const;
549 void subscribeToTopic (
const String& topic);
554 void unsubscribeFromTopic (
const String& topic);
582 void sendUpstreamMessage (
const String& serverSenderId,
583 const String& collapseKey,
585 const String& messageType,
604 virtual void notificationSettingsReceived (
const Settings& settings);
609 virtual void pendingLocalNotificationsListReceived (
const Array<Notification>& notifications);
625 virtual void handleNotification (
bool isLocalNotification,
const Notification& notification);
641 virtual void handleNotificationAction (
bool isLocalNotification,
643 const String& actionIdentifier,
644 const String& optionalResponse);
649 virtual void localNotificationDismissedByUser (
const Notification& notification);
658 virtual void deliveredNotificationsListReceived (
const Array<Notification>& notifications);
663 virtual void deviceTokenRefreshed (
const String& token);
670 virtual void remoteNotificationsDeleted();
676 virtual void upstreamMessageSent (
const String& messageId);
682 virtual void upstreamMessageSendingError (
const String& messageId,
const String& error);
695 friend bool juce_handleNotificationIntent (
void*);
697 friend struct JuceFirebaseInstanceIdService;
698 friend struct JuceFirebaseMessagingService;
701 #if JUCE_PUSH_NOTIFICATIONS
Holds a resizable array of primitive or copy-by-value objects.
Represents a colour, also including a transparency value.
Classes derived from this will be automatically deleted when the application exits.
Holds a fixed-size bitmap.
Holds a set of objects and can invoke a member function callback on each object in the set with a sin...
Singleton class responsible for push notifications functionality.
Array< Category > categories
list of categories the app wants to support
juce::Array< Action > actions
optional list of actions within this category
juce::String identifier
unique identifier
String identifier
Required: Unique channel group identifier.
String name
Required: User visible name of the channel group.
Android API level 26 or higher only: represents a channel group.
Describes settings we want to use for current device.
Describes a category of a notification.
A special array for holding a list of strings.
A container for holding a set of strings which are keyed by another string.
Represents a URL and has a bunch of useful functions to manipulate it.
A variant class, that can be used to hold a range of primitive values.
#define JUCE_DECLARE_SINGLETON(Classname, doNotRecreateAfterDeletion)
Macro to generate the appropriate methods and boilerplate for a singleton class.
Android API level 26 or higher only: Represents notification channel through which notifications will...
String groupId
Required: group this channel belongs to (see ChannelGroup).
String name
Required: User facing name of the channel.
Colour ledColour
Optional: sets the led colour for notifications in this channel.
Importance
Controls how interruptive the notification posted on this channel are.
URL soundToPlay
Optional: sound to play in this channel.
String description
Optional: user visible description of the channel.
Array< int > vibrationPattern
Optional: vibration pattern for this channel.
String identifier
Required: Unique channel identifier.
Register a listener (ideally on application startup) to receive information about notifications recei...
Represents an action on a notification that can be presented as a button or a text input.
StringArray allowedResponses
Optional: a list of possible answers if the answer set is limited.
String icon
Optional: name of an icon file (without an extension) to be used for this action.
String textInputPlaceholder
Optional: placeholder text for text input notification.
var parameters
Optional: additional parameters that can be passed.
Style
Controls the appearance of this action.
@ button
Show this action as a button.
String identifier
Required: unique identifier.
String textInputButtonText
Optional: Text displayed on text input notification button (from iOS 10 only).
Represents a notification that can be sent or received.
Image largeIcon
Optional: an additional large icon displayed in the notification content view.
BadgeIconType
Controls badge icon type to use if a notification is shown as a badge.
GroupAlertBehaviour
Controls sound and vibration behaviour for group notifications.
@ alertAll
both child notifications and group notifications should produce sound and vibration.
Progress progress
Optional: set to default (0, 0, false), to disable progress display.
Colour accentColour
Optional: sets accent colour.
String body
Required: the content of the notification, usually displayed in the second row.
String icon
Required: name of an icon file (without an extension) to be used for this notification.
TimestampVisibility
Controls timestamp visibility and format.
@ normal
Show normal timestamp.
@ chronometer
Show chronometer as a stopwatch.
@ off
Do not show timestamp.
Array< int > vibrationPattern
Optional: sets the vibration pattern in milliseconds.
String groupId
Optional: allows the OS to visually group, collapse, and expand a set of notifications,...
Array< Action > actions
Optional: actions associated with the notification.
String channelId
Required for Android API level 26 or above: specifies notification channel id.
String tickerText
Optional: ticker text used for accessibility services.
String title
Required: the title of the notification, usually displayed in the first row.
String subtitle
Optional: additional text, that may be displayed e.g.
String person
Optional: additional metadata used as a hint to OS that a notification is related to a specific perso...
String identifier
Required: unique id that can be used to later dismiss the notification (on iOS available from version...
var properties
Optional: collection of additional properties that may be passed as a dictionary.
Type
Metadata that can be used by the OS to better handle the notification, depending on its priority.
@ email
Async message like email.
@ unspecified
Category not set.
@ taskProgress
Progress for a long-running background operation.
@ error
Error in background operation or authentication status.
@ system
System or device status update.
@ promo
Promotion or advertisement.
@ social
Social network or sharing update.
@ reminder
User-scheduled reminder.
@ message
Incoming message (sms, instant message etc.).
@ recommendation
Specific, single thing related recommendation.
@ status
Ongoing information about device or contextual status.
@ call
Incoming voice/video call or similar.
@ service
Running background service.
String category
Required: determines set of actions that will appear (as per setup done in requestPermissionsWithSett...
std::unique_ptr< Notification > publicVersion
Optional: if you set lockScreenAppearance to showPartially, then you can provide "public version" of ...
String groupSortKey
Optional: Used to order notifications within the same group.
LedBlinkPattern ledBlinkPattern
Optional.
URL soundToPlay
Optional: empty when the notification should be silent.
Colour ledColour
Optional: Sets the led colour.
Priority
Metadata used as a hint to the OS about the priority of the notification.
LockScreenAppearance
Describes how to show the notification when the screen is locked.
Allows to control the time the device's led is on and off.
Used to represent a progress of some operation.