You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 14, 2025. It is now read-only.
ignoreInForeground:false, // (optional) if true, the notification will not be visible when the app is in the foreground (useful for parity with how iOS notifications appear)
330
330
shortcutId:"shortcut-id", // (optional) If this notification is duplicative of a Launcher shortcut, sets the id of the shortcut, in case the Launcher wants to hide the shortcut, default undefined
331
331
channelId:"your-custom-channel-id", // (optional) custom channelId, if the channel doesn't exist, it will be created with options passed above (importance, vibration, sound). Once the channel is created, the channel will not be update. Make sure your channelId is different if you change these options. If you have created a custom channel, it will apply options of the channel.
332
-
onlyAlertOnce:false, //(optional) alert will open only once with sound and notify, default: false
333
-
332
+
onlyAlertOnce:false, // (optional) alert will open only once with sound and notify, default: false
333
+
334
+
when:null, // (optionnal) Add a timestamp pertaining to the notification (usually the time the event occurred). For apps targeting Build.VERSION_CODES.N and above, this time is not shown anymore by default and must be opted into by using `showWhen`, default: null.
335
+
usesChronometer:false, // (optional) Show the `when` field as a stopwatch. Instead of presenting `when` as a timestamp, the notification will show an automatically updating display of the minutes and seconds since when. Useful when showing an elapsed time (like an ongoing phone call), default: false.
336
+
timeoutAfter:null, // (optional) Specifies a duration in milliseconds after which this notification should be canceled, if it is not already canceled, default: null
337
+
334
338
messageId:"google:message_id", // (optional) added as `message_id` to intent extras so opening push notification can find data stored by @react-native-firebase/messaging module.
335
339
336
340
actions:'["Yes", "No"]', // (Android only) See the doc for notification actions to know more
Copy file name to clipboardExpand all lines: example/NotifService.js
+10Lines changed: 10 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -55,10 +55,15 @@ export default class NotifService {
55
55
vibration: 300,// vibration length in milliseconds, ignored if vibrate=false, default: 1000
56
56
tag: 'some_tag',// (optional) add tag to message
57
57
group: 'group',// (optional) add group to message
58
+
groupSummary: false,// (optional) set this notification to be the group summary for a group of notifications, default: false
58
59
ongoing: false,// (optional) set whether this is an "ongoing" notification
59
60
actions: ['Yes','No'],// (Android only) See the doc for notification actions to know more
60
61
invokeApp: true,// (optional) This enable click on actions to bring back the application to foreground or stay in background, default: true
61
62
63
+
when: null,// (optionnal) Add a timestamp pertaining to the notification (usually the time the event occurred). For apps targeting Build.VERSION_CODES.N and above, this time is not shown anymore by default and must be opted into by using `showWhen`, default: null.
64
+
usesChronometer: false,// (optional) Show the `when` field as a stopwatch. Instead of presenting `when` as a timestamp, the notification will show an automatically updating display of the minutes and seconds since when. Useful when showing an elapsed time (like an ongoing phone call), default: false.
65
+
timeoutAfter: null,// (optional) Specifies a duration in milliseconds after which this notification should be canceled, if it is not already canceled, default: null
66
+
62
67
/* iOS only properties */
63
68
alertAction: 'view',// (optional) default: view
64
69
category: '',// (optional) default: empty string
@@ -91,10 +96,15 @@ export default class NotifService {
91
96
vibration: 300,// vibration length in milliseconds, ignored if vibrate=false, default: 1000
92
97
tag: 'some_tag',// (optional) add tag to message
93
98
group: 'group',// (optional) add group to message
99
+
groupSummary: false,// (optional) set this notification to be the group summary for a group of notifications, default: false
94
100
ongoing: false,// (optional) set whether this is an "ongoing" notification
95
101
actions: ['Yes','No'],// (Android only) See the doc for notification actions to know more
96
102
invokeApp: false,// (optional) This enable click on actions to bring back the application to foreground or stay in background, default: true
97
103
104
+
when: null,// (optionnal) Add a timestamp pertaining to the notification (usually the time the event occurred). For apps targeting Build.VERSION_CODES.N and above, this time is not shown anymore by default and must be opted into by using `showWhen`, default: null.
105
+
usesChronometer: false,// (optional) Show the `when` field as a stopwatch. Instead of presenting `when` as a timestamp, the notification will show an automatically updating display of the minutes and seconds since when. Useful when showing an elapsed time (like an ongoing phone call), default: false.
106
+
timeoutAfter: null,// (optional) Specifies a duration in milliseconds after which this notification should be canceled, if it is not already canceled, default: null
0 commit comments