Under localNotification:
ticker: "My Notification Ticker", // (optional)
autoCancel: true, // (optional) default: true
largeIcon: "ic_launcher", // (optional) default: "ic_launcher"
smallIcon: "ic_notification", // (optional) default: "ic_notification" with fallback for "ic_launcher"
tag: 'some_tag', // (optional) add tag to message
group: "group", // (optional) add group to message
ongoing: false, // (optional) set whether this is an "ongoing" notification
/* iOS only properties */
category: // (optional) default: null
Can anyone explain what these fields do? I played around with them, don't seem to notice any difference.
I had to dig all the way through to the Android Documentation to understand some of them does.
And yeah it'd be nice if we can come up with more documentation on these fields, so here's a few of them:
autoCancel
Setting this flag will make it so the notification is automatically canceled when the user clicks it in the panel.
ticker *
Sets the "ticker" text which is sent to accessibility services. Prior to LOLLIPOP, sets the text that is displayed in the status bar when the notification first arrives.
largeIcon
Set the large icon that is shown in the ticker and notification.
group
Set this notification to be part of a group of notifications sharing the same key.
ongoing
Set whether this is an ongoing notification.
Ongoing notifications differ from regular notifications in the following ways:
- Ongoing notifications are sorted above the regular notifications in the notification panel.
- Ongoing notifications do not have an 'X' close button, and are not affected by the "Clear all" button.
tag
If a notification with the same tag and id has already been posted by your application and has not yet been canceled, it will be replaced by the updated information.
* What is ticker text?
Text that summarizes this notification for accessibility services. As of the L release, this text is no longer shown on screen, but it is still useful to accessibility services (where it serves as an audible announcement of the notification's appearance).
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.
Most helpful comment
I had to dig all the way through to the Android Documentation to understand some of them does.
And yeah it'd be nice if we can come up with more documentation on these fields, so here's a few of them:
autoCancel
ticker *
largeIcon
group
ongoing
tag
* What is ticker text?
Text that summarizes this notification for accessibility services. As of the L release, this text is no longer shown on screen, but it is still useful to accessibility services (where it serves as an audible announcement of the notification's appearance).