Firebase - Create Android message
Audience:
Low-code EngineersSkill Prerequisites:
Actions,Tokens,Firebase project
Builds the Android settings of a Firebase push notification and saves them as JSON in a token. It doesn't send anything. Pass the token into the Android Specific Notification Json parameter of Firebase - Send push notification.
Use it to set Android options such as the priority, icon, color, sound and click action, or to give Android a different title, body or data than the other platforms.
This action is part of the Push Notifications add-on (DnnSharp.PushNotifications). The add-on is installed separately and needs the PUSHN feature in your license. If it isn't licensed, the action fails with a "not licensed" error. If you don't see the Push Notifications actions, the add-on isn't installed.
Typical Use Cases
- Send urgent alerts with high priority so they arrive when the device is idle
- Set the small icon, icon color and sound of the notification
- Open a specific screen of your app when the user taps the notification
- Use localized strings from the app instead of text sent from the server
Don't use it to
- Send the notification. Use Firebase - Send push notification after this action.
- Set iOS or browser options. Use Firebase - Create iOS message or Firebase - Create WebPush message.
Related Actions
| Action Name | Description |
|---|---|
| Firebase - Send push notification | Sends the notification with the settings built by this action. |
| Firebase - Create iOS message | Builds the iOS settings of the notification. |
| Firebase - Create WebPush message | Builds the browser settings of the notification. |
Input Parameter Reference
| Parameter | Description | Supports Tokens | Default | Required |
|---|---|---|---|---|
| Priority | High or Normal. High priority messages are delivered right away, even when the device is idle. | Yes | High | No |
| Collapse Key | Groups messages that replace each other. When the device is offline, only the last message with this key is delivered when it comes back. Firebase allows up to 4 different collapse keys at a time. | Yes | empty string | No |
| Time to live | How long Firebase keeps the message while the device is offline, in the format days.hours:minutes:seconds, for example 1.00:00:00 for one day or 04:00:00 for four hours. A value that can't be read is ignored. | Yes | empty string | No |
| Title localization key | The key of a string in the app's resources to use as the title. When it has a value, Message Title is ignored. | Yes | empty string | No |
| Title localization args | Values that replace the format specifiers in the title string. One value per row. Shown when Title localization key has a value. | Yes | empty | No |
| Message Title | The Android title. It replaces the Message Title of the Send action on Android. Hidden when Title localization key has a value. | Yes | empty string | No |
| Body localization key | The key of a string in the app's resources to use as the body. When it has a value, Message Body is ignored. | Yes | empty string | No |
| Body localization args | Values that replace the format specifiers in the body string. One value per row. Shown when Body localization key has a value. | Yes | empty | No |
| Message Body | The Android body. It replaces the Message Body of the Send action on Android. Hidden when Body localization key has a value. | Yes | empty string | No |
| Message Icon | The name of the notification icon resource in the app, for example ic_notification. | Yes | empty string | No |
| Message Color | The icon color in #rrggbb format, for example #2E7D32. | Yes | empty string | No |
| Message Sound | The sound to play, for example default or the name of a sound resource in the app. | Yes | empty string | No |
| Message Click Action | The action that runs when the user taps the notification. The app must have an activity with a matching intent filter. | Yes | empty string | No |
| Data Input Type | Where the custom data comes from: Name Value Pairs or List Name. | No | Name Value Pairs | No |
| Data | Custom key/value pairs sent to the Android app. Shown when Data Input Type is Name Value Pairs. | Yes, keys and values | empty | No |
| Data List Name | The name of a list whose items have key and value fields. Shown when Data Input Type is List Name. | No | empty string | No |
| Output Token | The name of the token that receives the JSON, for example AndroidJson. Brackets are optional. | No | empty string | Yes |
Output Parameters Reference
| Parameter | Description |
|---|---|
[<Output Token>] | The Android settings as JSON. Pass it into Android Specific Notification Json of the Send action. |
Considerations
- Output Token is required. If Output Token is empty, the action does nothing and shows no error.
- Android data replaces the common data. If you set Data here, Firebase sends it to Android devices instead of the Data of the Send action. Repeat any common keys here.
- Time to live format. A plain number is read as days.
3600means 3600 days, not seconds. - Color format. Firebase only accepts
#rrggbb. In 1.28, the Send action doesn't report send errors, so a wrong color means the notification isn't sent and the only trace is in the site's log. - Data list format. With List Name, every item must have a
keyfield and avaluefield, and keys must be unique. Otherwise, the action fails. If the list doesn't exist, no data is added.
Examples
To understand how to use the below examples, please see Running Examples.
1. Build high-priority Android settings
This action builds Android settings with high priority, a one-hour time to live, a collapse key, an icon, a color and a click action. It adds the order ID as Android data and saves the JSON in AndroidJson. Pass [AndroidJson] into the Send action.
{
"Title": "Firebase - Create Android message",
"ActionType": "Firebase.CreateAndroidFirebaseMessage",
"Description": "Build the Android order update",
"Parameters": {
"Priority": "High",
"CollapseKey": "order-[OrderId]",
"TimeToLive": "01:00:00",
"Title": "Order [OrderId] update",
"Body": "Your order is out for delivery.",
"Icon": "ic_notification",
"Color": "#2E7D32",
"Sound": "default",
"ClickAction": "OPEN_ORDER",
"DataInputType": "NameValue",
"Data": {
"orderId": "[OrderId]"
},
"OutputToken": "AndroidJson"
}
}
2. Use localized strings from the app
This action uses the order_shipped_title and order_shipped_body strings from the app's resources. The order ID replaces the format specifier in the body string.
{
"Title": "Firebase - Create Android message",
"ActionType": "Firebase.CreateAndroidFirebaseMessage",
"Description": "Build localized Android text",
"Parameters": {
"Priority": "Normal",
"TitleLocKey": "order_shipped_title",
"BodyLocKey": "order_shipped_body",
"BodyLocArgs": [
"[OrderId]"
],
"DataInputType": "NameValue",
"Data": {},
"OutputToken": "AndroidJson"
}
}
Revised 10/03/2026