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
+6-22Lines changed: 6 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,32 +5,14 @@ Version 3.3.0 of this plugin added FCM support (which is the successor of GCM).
5
5
6
6
Although using push messages in your Firebase app is really easy setting it up is not. Traditionally, especially for iOS.
7
7
8
+
If you didn't choose this feature during installation you can add `"messaging": true` to `<app-root>/firebase.nativescript.json` and remove the `<app-root>/platforms` folder.
9
+
8
10
### Android
9
-
If you didn't choose this feature during installation you can uncomment `firebase-messaging` in [include.gradle](../platforms/android/include.gradle)
11
+
No additional setup required.
10
12
11
-
You will not get the title and body if the notification was received while the application was in the background, but you will get the *data* payload.
12
-
13
-
Add the following services in the `app/App_Resources/Android/AndroidManifest.xml` to enable advanced FCM messaging:
There is a little quirk: you will currently not get the title and body if the notification was received while the application was in the background, but you will get the *data* payload.
31
14
32
15
### iOS
33
-
If you didn't choose this feature during installation you can run the "post install" script again (see the main readme) to add messaging support.
34
16
35
17
#### Enable push support in Xcode
36
18
@@ -280,6 +262,8 @@ The payload to trigger the notification in the screenshots above is:
280
262
}
281
263
```
282
264
265
+
> *IMPORTANT* Use the `click_action` only for push notifications on iOS. When such a message is tapped in the Android notification center the app WON'T be opened. This will probably be fixed in the future.
266
+
283
267
### (iOS) showing a notification while the app is in the foreground
284
268
Add the `showWhenInForeground` flag to your payload:
0 commit comments