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 has been archived by the owner on Sep 4, 2020. It is now read-only.
According to the documentation: data.additionalData.coldstart: Will be true if the application is started by clicking on the push notification, false if the app is already started.
Actual Behaviour
On iOS, coldstart behaves as expected.
On Adnroid, when app in background and receiving notifications from FCM with only data section that includes "title", "message" and some app specific data.
If payload also contains "content-available": "1" then on('notification') is always fired with "coldstart":true, "foreground":false when app receives notification in the background, and also when user clicks on the notification.
If payload contains "content-available": "0" then on('notification') is fired only when user clicks on the notification (as expected) but with "coldstart":false, "foreground":false.
Platform and Version
Android Version: 10
Device: Samsung Galaxy A series
Cordova CLI: 9.0.3
Cordova android version: 8.1.0
phonegap-plugin-push: 2.3.0
(Sending push from AWS-SNS using FCM for Android and APNS for iOS)
Sample Push Data Payload
{
"data": {
"title": "my title",
"message": "my message",
"notId": 206891,
"collapse_key": "2231900",
"time_to_live": 86400,
"content-available": "1",
"lastUpdate": "2020-07-28T08:53:14Z",
"data-key-1": 2231900,
"data-key-2": [... array of numbers ...]
}
}
The text was updated successfully, but these errors were encountered:
livesemantics
changed the title
[Android] on('notification') is not working as expected
[Android] on('notification') payload contains 'coldstart':true in background notifications with 'content-available': '1'
Jul 28, 2020
livesemantics
changed the title
[Android] on('notification') payload contains 'coldstart':true in background notifications with 'content-available': '1'
[Android] on('notification') 'coldstart' value is acting wacky and not as documented (works only on iOS)
Jul 29, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Expected Behaviour
According to the documentation: data.additionalData.coldstart: Will be true if the application is started by clicking on the push notification, false if the app is already started.
Actual Behaviour
On iOS, coldstart behaves as expected.
On Adnroid, when app in background and receiving notifications from FCM with only data section that includes "title", "message" and some app specific data.
If payload also contains "content-available": "1" then on('notification') is always fired with "coldstart":true, "foreground":false when app receives notification in the background, and also when user clicks on the notification.
If payload contains "content-available": "0" then on('notification') is fired only when user clicks on the notification (as expected) but with "coldstart":false, "foreground":false.
Platform and Version
Android Version: 10
Device: Samsung Galaxy A series
Cordova CLI: 9.0.3
Cordova android version: 8.1.0
phonegap-plugin-push: 2.3.0
(Sending push from AWS-SNS using FCM for Android and APNS for iOS)
Sample Push Data Payload
{
"data": {
"title": "my title",
"message": "my message",
"notId": 206891,
"collapse_key": "2231900",
"time_to_live": 86400,
"content-available": "1",
"lastUpdate": "2020-07-28T08:53:14Z",
"data-key-1": 2231900,
"data-key-2": [... array of numbers ...]
}
}
The text was updated successfully, but these errors were encountered: