Advanced

🏗 Notification Structures

Content

Required

The content in push data is required

AttributeRequiredDescriptionTypeValue LimitsDefault
idYESNumber that identifies a unique notificationint1 - 2.147.483.647
channelKeyYESString key that identifies a channel where not. will be displayedStringchannel must be enabledbasic_channel
titleNOThe title of notificationStringunlimited
bodyNOThe body content of notificationStringunlimited
summaryNOA summary to be displayed when the content is protected by privacyStringunlimited
categoryNOThe notification category that best describes the nature of the notification for O.S.EnumeratorNotificationCategory
badgeNOSet a badge value over app iconint0 - 999.999
showWhenNOHide/show the time elapsed since notification was displayedbooltrue or falsetrue
displayOnForegroundNOHide/show the notification if the app is in the Foreground (streams are preserved )booltrue or falsetrue
displayOnBackgroundNOHide/show the notification if the app is in the Background (streams are preserved ). OBS: Only available for iOS with background special permissionsbooltrue or falsetrue
iconNOSmall icon to be displayed on the top of notification (Android only)Stringmust be a resource image
largeIconNOLarge icon displayed at right middle of compact notificationStringunlimited
bigPictureNOBig image displayed on expanded notificationStringunlimited
autoDismissibleNONotification should auto dismiss when gets tapped by the user (has no effect for reply actions on Android)booltrue or falsetrue
colorNONotification text colorColor0x000000 to 0xFFFFFF0x000000 (Colors.black)
backgroundColorNONotification background colorColor0x000000 to 0xFFFFFF0xFFFFFF (Colors.white)
payloadNOHidden payload contentMap<String, String>Only String for valuesnull
notificationLayoutNOLayout type of notificationEnumeratorNotificationLayoutDefault
hideLargeIconOnExpandNOHide/show the large icon when notification gets expandedbooltrue or falsefalse
lockedNOBlocks the user to dismiss the notificationbooltrue or falsefalse
progressNOCurrent value of progress bar (percentage). Null for indeterminate.int0 - 100null
tickerNOText to be displayed on top of the screen when a notification arrivesStringunlimited
actionType (Only for Android)NONotification action response typeEnumeratorActionTypeDefault

Action Buttons

Optional

The actionButtons in push data is optional

  • Is necessary at least one *required attribute
AttributeRequiredDescriptionTypeValue LimitsDefault
keyYESText key to identifies what action the user took when tapped the notificationStringunlimited
label*YESText to be displayed over the action buttonStringunlimited
icon*YESIcon to be displayed inside the buttonStringmust be a resource image
colorNOLabel text color (only for Android)Color0x000000 to 0xFFFFFF
enabledNOOn Android, deactivates the button. On iOS, the button disappearbooltrue or falsetrue
autoDismissibleNONotification should auto cancel when gets tapped by the userbooltrue or falsetrue
showInCompactViewNOFor MediaPlayer notifications on Android, sets the button as visible in compact viewbooltrue or falsetrue
isDangerousOptionNOMark the button as a dangerous option, displaying the text in redbooltrue or falsefalse
actionTypeNONotification action response typeEnumeratorActionTypeDefault

Schedules

Interval

schedule in Push data is optional

AttributeRequiredDescriptionTypeValue Limits / FormatDefault
intervalYESTime interval between each notification (minimum of 60 sec case repeating)Int (seconds)Positive unlimited
allowWhileIdleNODisplays the notification, even when the device is low batterybooltrue or falsefalse
repeatsNODefines if the notification should play only once or keeps repeatingbooltrue or falsefalse
timeZoneNOTime zone identifier (ISO 8601)String"America/Sao_Paulo", "GMT-08:00" or "UTC""UTC"

Calendar

schedule in Push data is optional

  • Is necessary at least one *required attribute
  • If the calendar time condition is not defined, then any value is considered valid in the filtering process for the respective time component
AttributeRequiredDescriptionTypeValue Limits / FormatDefault
era,*YESSchedule era conditionInteger0 - 99999
year,*YESSchedule year conditionInteger0 - 99999
month,*YESSchedule month conditionInteger1 - 12
day,*YESSchedule day conditionInteger1 - 31
hour,*YESSchedule hour conditionInteger0 - 23
minute,*YESSchedule minute conditionInteger0 - 59
second,*YESSchedule second conditionInteger0 - 59
weekday,*YESSchedule weekday conditionInteger1 - 7
weekOfMonth,*YESSchedule weekOfMonth conditionInteger1 - 6
weekOfYear,*YESSchedule weekOfYear conditionInteger1 - 53
allowWhileIdleNODisplays the notification, even when the device is low batterybooltrue or falsefalse
repeatsNODefines if the notification should play only once or keeps repeatingbooltrue or falsefalse
timeZoneNOTime zone identifier (ISO 8601)String"America/Sao_Paulo", "GMT-08:00" or "UTC""UTC"

Crontab

Android

Crontab is only available on Android

schedule in Push data is optional

  • Is necessary at least one *required attribute
  • Cron expression must respect the format (with seconds precision) as described in this article
AttributeRequiredDescriptionTypeValue Limits / FormatDefault
initialDateTimeNOInitial limit date of valid dates (does not fire any notification)StringYYYY-MM-DD hh:mm:ss
expirationDateTimeNOFinal limit date of valid dates (does not fire any notification)StringYYYY-MM-DD hh:mm:ss
crontabExpression*YESCrontab rule to generate new valid dates (with seconds precision)booltrue or falsefalse
preciseSchedules*YESList of precise valid dates to firebooltrue or falsefalse
allowWhileIdleNODisplays the notification, even when the device is low batterybooltrue or falsefalse
repeatsNODefines if the notification should play only once or keeps repeatingbooltrue or falsefalse
timeZoneNOTime zone identifier (ISO 8601)String"America/Sao_Paulo", "GMT-08:00" or "UTC""UTC"
Previous
📡 Channels