Loading...
Searching...
No Matches
juce::PushNotifications::Notification::Action Struct Reference

## Detailed Description

Represents an action on a notification that can be presented as a button or a text input.

On Android, each notification has its action specified explicitly, on iOS you configure an allowed set of actions on startup and pack them into categories (see Settings).

The documentation for this struct was generated from the following file:

- juce_gui_extra/misc/juce_PushNotifications.h

## Public Types

enum | Style { button , text }
| Controls the appearance of this action. More...

## Public Attributes

Common fields
Style | style = button
String | title
| Required.
String | textInputPlaceholder
| Optional: placeholder text for text input notification.
var | parameters
| Optional: additional parameters that can be passed.
iOS only fields
String | identifier
| Required: unique identifier.
bool | triggerInBackground = false
| Whether the app can process the action in background.
bool | destructive = false
| Whether to display the action as destructive.
String | textInputButtonText
| Optional: Text displayed on text input notification button.
Android only fields
String | icon
| Optional: name of an icon file (without an extension) to be used for this action.
StringArray | allowedResponses
| Optional: a list of possible answers if the answer set is limited.

## Member Enums

## Style

enum juce::PushNotifications::Notification::Action::Style

Controls the appearance of this action.

Enumerator
button | Show this action as a button.
text | Show this action as a text input field (on Android API 20 or higher is required).

## Member Data Documentation

## style

Style juce::PushNotifications::Notification::Action::style = button

## title

String juce::PushNotifications::Notification::Action::title

Required.

the name of the action displayed to the user.

## textInputPlaceholder

String juce::PushNotifications::Notification::Action::textInputPlaceholder

Optional: placeholder text for text input notification.

Note that it will be ignored if button style is used.

## parameters

var juce::PushNotifications::Notification::Action::parameters

Optional: additional parameters that can be passed.

## identifier

String juce::PushNotifications::Notification::Action::identifier

Required: unique identifier.

This should be one of the identifiers set with requestPermissionsWithSettings().

## triggerInBackground

bool juce::PushNotifications::Notification::Action::triggerInBackground = false

Whether the app can process the action in background.

## destructive

bool juce::PushNotifications::Notification::Action::destructive = false

Whether to display the action as destructive.

## textInputButtonText

String juce::PushNotifications::Notification::Action::textInputButtonText

Optional: Text displayed on text input notification button.

Note that it will be ignored if style is set to Style::button.

## icon

String juce::PushNotifications::Notification::Action::icon

Optional: name of an icon file (without an extension) to be used for this action.

This must be the name of one of the image files included into resources when exporting an Android project (see "Extra Android Raw Resources" setting in Projucer). Note that not all Android versions support an icon for an action, though it is recommended to provide it nevertheless.

## allowedResponses

StringArray juce::PushNotifications::Notification::Action::allowedResponses

Optional: a list of possible answers if the answer set is limited.

When left empty, then the user will be able to input any text.

### Purchase

Get JUCE

### Discover

What's New in JUCE Features

### Learn

Documentaion Tutorials Made with JUCE Resources

### Support

JUCE Forum Newsletter Archive

### About

Contact Us JUCE Legal JUCE Licensing FAQ

### Events

Audio Developer Conference
© Raw Material Software Limited