Open magynhard opened 3 years ago
Seems to be related with: https://github.com/phonegap/phonegap-plugin-push/issues/2783 https://github.com/phonegap/phonegap-plugin-push/issues/2824
Any updates on this? I too am facing the same issue.
@duca14036 Are you interested in merging your fixes with this repo? This is now more actively maintained. Thanks!
Is this issue related or asme as this one #172 ? which I just opened yesterday . Take a look , I do found some solution for foreground notifications, just have some question about the purpose and responsibility of the codes I comment out .
@gary258796
If I'm correct, in effect what you are doing is treating foreground notifications the same as background notifications by commenting those lines. I like the solution above better, because you'll still be able to differentiate between them. But if it works for you then it's good 😀
@gabn88 By 'solution above', do you mean changing the payload from @duca14036 ? https://github.com/phonegap/phonegap-plugin-push/issues/2783#issuecomment-621972933
same issue here
same here!! anyone found a way to fix it ?
The solution is waiting here: https://github.com/havesource/cordova-plugin-push/pull/186 for almost 9 months now for no reason
Bug Report
Expected Behaviour
When i send a push notification by FCM to my app on an iOS device and the app is opened in foreground, the event on('notification') is called so i can retrieve and process the push message.
Actual Behaviour
When i send a push notification to my app on an iOS device and the app is opened in foreground, no event is fired. Nothing happens.
The only information i found, was, that for "silent notifications" (no idea what that is) with FCM there is a attribute
content_available: true
at the payload. https://github.com/havesource/cordova-plugin-push/blob/master/docs/PAYLOAD.md#fcm-payload-detailsBut this seems to be outdated, as i get an error, that this attribute is invalid when using it while sending (see code example below).
Reproduce Scenario (including but not limited to)
Steps to Reproduce
Send a push notification to your app when it is open in the foreground. See code below in the example.
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
iPhone: 6S iOS: 13.4.1
cordova info
PrintoutCordova Packages:
Project Installed Platforms:
Project Installed Plugins:
Environment:
android Environment:
ERROR: Command failed with ENOENT: android list target spawn android ENOENT
Project Setting Files:
--- Start of Cordova JSON Snippet ---
--- End of Cordova JSON Snippet ---
Sample Push Data Payload
Sample Code that illustrates the problem
Logs taken while reproducing problem