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 Feb 7, 2019. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+4-6Lines changed: 4 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ In the Command prompt / Terminal navigate to your application root folder and ru
26
26
27
27
tns platform add android
28
28
29
-
- Add the `google-settings.json` file with the FCM configuration to the `app/App_Resources/Android folder` in your app
29
+
- Add the `google-settings.json` file with the FCM configuration to the `app/App_Resources/Android folder` in your app. If this file is not added, building the app for android will fail.
30
30
31
31
The plugin will default to version 11.4.2 of the `firebase-messaging` SDK. If you need to change the version, you can add a project ext property `firebaseMessagingVersion` like so:
32
32
@@ -84,7 +84,7 @@ Add code in your view model or compoent to subscribe and receive messages (don't
84
84
85
85
tns run android
86
86
87
-
- The access token is written in the console and displayed on the device after the plugin sucessfully subscribes to receive notifications. When notification comes, the message will be displayed in the notification area if the app is closed or on screen if the app is open.
87
+
- The access token is written in the console and displayed on the device after the plugin sucessfully subscribes to receive notifications. When a notification comes, the message will be displayed in the notification area if the app is closed or handled directly in the onMessageReceived callback if the app is open.
88
88
89
89
### iOS
90
90
@@ -330,7 +330,6 @@ The `categories` array from the iOS interactive settings contains:
| stringifiedData | String | A string containing JSON data from the notification |
335
334
| fcmNotification | Object | iOS/Android | Function | The FCMNotification object. |
336
335
@@ -462,7 +461,7 @@ When in background mode, a notification is constructed according to the values o
462
461
463
462
#### Handling **Notification** Messages
464
463
465
-
If the app is in foreground, it invokes the `onMessageReceived` callback with three arguments (stringifiedData, fcmNotification).
464
+
If the app is in foreground, it invokes the `onMessageReceived` callback with two arguments (stringifiedData, fcmNotification).
466
465
467
466
If the app is in background, a notification is put in the tray. When tapped, it launches the app, but does not invoke the `onMessageReceived` callback.
Depending on the notification event and payload, the `onMessageReceived` callback is invoked with up to three arguments.
496
+
Depending on the notification event and payload, the `onMessageReceived` callback is invoked with two arguments.
498
497
499
-
*`message` - *String*. A string representation of the `data.message` value in the notification payload.
500
498
*`stringifiedData` - *String*. A stringified JSON representation of the `data` value in the notification payload.
501
499
*`fcmNotification` - `RemoteMessage.Notification`. A representation of the `RemoteMessage.Notification` class which can be accessed according to its public methods. This parameter is available in case the callback was called from a message with a `notification` key in the payload.
0 commit comments