Push Notification
You can use this activity to create and push a notification to the mobile applications using BWMI. It uses Firebase Cloud Messaging (FCM) to send notifications to android devices and Apple Push Notification service (APNS) using HTTP/2 protocol to send notifications to iOS devices.
General
The General tab has the following fields:
Field | Module Property | Description |
---|---|---|
Name | No | The name to be displayed as the label for the activity in the process. |
Notification Service | No |
Describes the configuration channel supported by the activity. You can select a channel from the following: Default value is FCM. |
Use OAuth for FCM | No | Select the Use OAuth for FCM check box to send a notification through FCM by using HTTPS OAUTH mechanism. The check box is not selected by default and the notification is sent by using HTTPS. |
FCM API Key | Yes | Available only when the Use OAuth for FCM check box is not selected. It is the Cloud Messaging API key for the project configured in FCM and refers to the FCM project-specific cloud messaging server key. |
FCM Project Id | Yes | Available only when the Use OAuth for FCM check box is selected. The project Id in FCM. This is a unique identifier for your Firebase project that can be found in this URL of the project: https://console.firebase.google.com/project/<projectId> |
FCM Token Path | Yes | Available only when the Use OAuth for FCM check box is selected. It is a private key file in JSON format for your service account. Use this key to retrieve a short-lived OAuth 2.0 token. It can be generated by the Firebase console. |
APNS Connection Auth Type | No | Specifies the APNS connection type. You can select a connection type from the following: |
APNS TLS Certificate Path | Yes | The provider certification provisioned by Apple when you establish a push service in your online developer account. |
APNS TLS Certificate Password | Yes | Provider certificate password. |
APNS Token Path | Yes | A universal provider token provisioned by Apple when JWT token is used to provide validation credentials for connection with APNS. |
APNS TEAM ID | Yes | Provider token team ID. It is the team ID of your Apple developer account. |
APNS KEY ID | Yes | Provider token key ID. It is the key ID obtained when you generate the APNS authorization key or the JWT token. |
Use Proxy Setting | Yes | Specify the Use Proxy Setting field, if proxy support is required when sending a notification through FCM and APNS. This can be configured by using the proxy shared resource. |
Input
The Input tab contains the following elements:
Field | Optional or Required | Description | ||
---|---|---|---|---|
title | Optional | The title of the notification. | ||
body | Optional | The body text of the notification. | ||
sound | Optional | The sound to play when the device receives the notification. | ||
bodyLocKey | Optional | The key to the body string in the string resources of the application used to localize the body text to the current location of the user. | ||
bodyLocArgs | Optional | The variable string values used in place of the format specifiers in bodyLocKey field to localize the body text to the current location of the user. Value type is Array of strings. | ||
titleLocKey | Optional | The key to the title string in the string resources of the application used to localize the title text to the current location of the user. | ||
titleLocArgs | Optional | The variable string values to be used in place of the format specifiers in titleLocKey to use to localize the title text to the current location of the user. The value type is Array of strings. | ||
collapseKey | Optional | An identifier of a group of messages that can be collapsed, so that only the last message is sent when delivery is resumed. | ||
priority | Optional | Specifies message priority. Value can be set to HIGH or NORMAL. | ||
timeToLive | Optional | Specifies the time (in seconds), the message must be kept by the channel if the device is offline. | ||
devices | Required | Android and iOS devices are supported. | ||
android | Optional | Placeholder for specifying data specific to Android devices. | ||
deviceToken | Required | Address of the application running on a mobile device. It identifies both the application and the device it is running on. This field can be repeated multiple times. | ||
androidChannelId | Optional | Channel ID (new Android O) of the notification. This is only applicable if FCM is used without OAuth. | ||
clickAction | Optional | Action performed when you click the notification. | ||
color | Optional | Icon color of the notification. Expressed in #rrggbb format. | ||
icon | Optional | Icon of the notification. | ||
tag | Optional | Identifier used to replace existing notifications in the notification drawer. If not specified, each request creates a new notification. | ||
dryRun | Optional | A parameter when set to true, allows developers to test a request without actually sending a notification. This is only applicable if FCM is used without OAuth. | ||
ios | Optional | Placeholder for specifying data specific to iOS devices. | ||
device | Required | This field can be repeated multiple times. | ||
deviceToken | Required | Address of the application running on a mobile device. It identifies both the application and the device it is running on. | ||
topic | Required | Topic of the remote notification. Typically, it is the bundle ID of your application. | ||
badge | Optional | You must set the key when you want the system to modify the badge of your application's icon. If this key is not included in the dictionary, the badge is not changed. To remove the badge, set the value of this key to 0. | ||
actionLocKey | Optional | A string that is displayed by the system as an alert. The alert also includes Close and View buttons. | ||
launchImage | Optional | Name of an image file in the application bundle, with or without the file name extension. The image is used as the launch image when you tap the action button or move the action slider. | ||
contentAvailable | Optional | When set to 1, the system starts the application in the background and delivers the notification to the delegated application. | ||
category | Optional | A key with a string value that represents the type of notification. | ||
data | Optional | A repeatable set of custom key-value pair, which allows you to pass custom data with the notification. | ||
key | Optional | Key of the custom data. | ||
value | Optional | Value of the custom data. |
Output
The Output of the activity contains the notification ID.
Field | Description |
---|---|
notificationId | The unique ID of the notification generated by the BWMI. |
Notification Status | Displays whether the notification was sent successfully to Android devices and iOS devices.
For a successfully delivered notification only the device token is displayed. For a notification that failed to be delivered, the device token, topic, and the reason for failure are displayed. |