Expected Behaviour
Receive push when app is opened or closed
and .on('notification') get fired when app is opened or closed
Actual Behaviour
Can't peceive push when app is opened or closed
and .on('notification') is not fired when app is opened or closed
Reproduce Scenario (including but not limited to)
Steps to Reproduce
see payload
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
iOS 12
(Android) What device vendor (e.g. Samsung, HTC, Sony...)
Cordova CLI version and cordova platform version
Plugin version
phonegap-plugin-push version 2.2.3
Sample Push Data Payload
URL POST https://fcm.googleapis.com/fcm/send
- 1
app is closed, no push received
app is open, no push received
{
"registration_ids":["cU9E..kmL"],
"data" : {
"sound":"default",
"title":"Portugal vs. Den12mark 1",
"body":"great match!"
},
"content_available":true
}
- 2
app is closed, push received, when click push "notification" not fired
app is open, no push received
{
"registration_ids":["cU9E..kmL"],
"notification" : {
"sound":"default",
"title":"Portugal vs. Den12mark 1",
"body":"great match!"
},
"content_available":true
}
Sample Code that illustrates the problem
APP.push = PushNotification.init({
android: {
vibrate: true,
forceShow: true
},
ios: {
alert: true,
sound: true
}
});
APP.push.on('notification', (result) => {
alert('notification=' + JSON.stringify(result || ''));
if (result) {
if (result.additionalData) {
if (result.additionalData.notId) {
APP.push.finish(() => {}, () => {}, result.additionalData.notId);
};
};
};
});
Logs taken while reproducing problem
no log, app is build on "phonegap build" and being deployed to appstore on testflight for production
Expected Behaviour
Receive push when app is opened or closed
and .on('notification') get fired when app is opened or closed
Actual Behaviour
Can't peceive push when app is opened or closed
and .on('notification') is not fired when app is opened or closed
Reproduce Scenario (including but not limited to)
Steps to Reproduce
see payload
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
iOS 12
(Android) What device vendor (e.g. Samsung, HTC, Sony...)
Cordova CLI version and cordova platform version
IOS
phonegap build version cli-8.0.0
phonegap cordova ios version 4.5.4
Android
phonegap build version cli-8.0.0
phonegap cordova android version 7.0.0
Plugin version
phonegap-plugin-push version 2.2.3
Sample Push Data Payload
URL POST https://fcm.googleapis.com/fcm/send
app is closed, no push received
app is open, no push received
app is closed, push received, when click push "notification" not fired
app is open, no push received
Sample Code that illustrates the problem
Logs taken while reproducing problem
no log, app is build on "phonegap build" and being deployed to appstore on testflight for production