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 Apr 4, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: docs/MESSAGING.md
+28Lines changed: 28 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -110,6 +110,34 @@ Similarly to the message callback you can either wire this through `init` or as
110
110
);
111
111
```
112
112
113
+
### Disable automatic notification creation
114
+
115
+
By default, this plugin will display a notification every time it receives one. If you want to disable this
116
+
behaviour and handle the notifications yourself on the `onMessageReceivedCallback`, you need to set the
117
+
`displayNotifications` option to `false`:
118
+
119
+
```js
120
+
firebase.init({
121
+
displayNotifications:false,
122
+
});
123
+
```
124
+
125
+
You can display or schedule notifications yourself using the plugin [`nativescript-local-notifications`](https://github.com/EddyVerbruggen/nativescript-local-notifications).
126
+
127
+
This might be helpful too if you or some other plugin you use is already setting the current notification center
128
+
`delegate` property, as in that case adding another plugin that does that would result in a conflict.
129
+
130
+
### Always show notifications when the application is in foreground
131
+
132
+
If you always want to display notifications while the application is in foreground withouth sending additional
133
+
parameters/data when sending the push notification, you need to set the `showWhenInForeground` option to `true`:
134
+
135
+
```js
136
+
firebase.init({
137
+
showWhenInForeground:true,
138
+
});
139
+
```
140
+
113
141
### Send messages to Topics
114
142
Based on the publish/subscribe model, FCM topic messaging allows you to send a message to multiple devices that have opted in to a particular topic. You compose topic messages as needed, and FCM handles routing and delivering the message reliably to the right devices.
0 commit comments