Skip to main content
Version: 1.28 (Current)

Firebase - Create Android message

Audience: Low-code Engineers

Skill 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.

note

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​

Action NameDescription
Firebase - Send push notificationSends the notification with the settings built by this action.
Firebase - Create iOS messageBuilds the iOS settings of the notification.
Firebase - Create WebPush messageBuilds the browser settings of the notification.

Input Parameter Reference​

ParameterDescriptionSupports TokensDefaultRequired
PriorityHigh or Normal. High priority messages are delivered right away, even when the device is idle.YesHighNo
Collapse KeyGroups 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.Yesempty stringNo
Time to liveHow 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.Yesempty stringNo
Title localization keyThe key of a string in the app's resources to use as the title. When it has a value, Message Title is ignored.Yesempty stringNo
Title localization argsValues that replace the format specifiers in the title string. One value per row. Shown when Title localization key has a value.YesemptyNo
Message TitleThe Android title. It replaces the Message Title of the Send action on Android. Hidden when Title localization key has a value.Yesempty stringNo
Body localization keyThe key of a string in the app's resources to use as the body. When it has a value, Message Body is ignored.Yesempty stringNo
Body localization argsValues that replace the format specifiers in the body string. One value per row. Shown when Body localization key has a value.YesemptyNo
Message BodyThe Android body. It replaces the Message Body of the Send action on Android. Hidden when Body localization key has a value.Yesempty stringNo
Message IconThe name of the notification icon resource in the app, for example ic_notification.Yesempty stringNo
Message ColorThe icon color in #rrggbb format, for example #2E7D32.Yesempty stringNo
Message SoundThe sound to play, for example default or the name of a sound resource in the app.Yesempty stringNo
Message Click ActionThe action that runs when the user taps the notification. The app must have an activity with a matching intent filter.Yesempty stringNo
Data Input TypeWhere the custom data comes from: Name Value Pairs or List Name.NoName Value PairsNo
DataCustom key/value pairs sent to the Android app. Shown when Data Input Type is Name Value Pairs.Yes, keys and valuesemptyNo
Data List NameThe name of a list whose items have key and value fields. Shown when Data Input Type is List Name.Noempty stringNo
Output TokenThe name of the token that receives the JSON, for example AndroidJson. Brackets are optional.Noempty stringYes

Output Parameters Reference​

ParameterDescription
[<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. 3600 means 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 key field and a value field, and keys must be unique. Otherwise, the action fails. If the list doesn't exist, no data is added.

Examples​

tip

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