forked from phonegap/phonegap-plugin-push
-
Notifications
You must be signed in to change notification settings - Fork 284
Open
Description
Bug Report
When the app is killed (i.e. totally shutdown, not idle in the background), tapping on an action button with the 'foreground: false' flag does not invoke the target method until the app is manually opened again. This is not an issue when 'foreground:true' is flagged, nor is it an issue on iOS.
Expected Behaviour
The app should invoke the target method immediately.
Actual Behaviour
The app invokes the target method the next time the application is opened.
Reproduce Scenario (including but not limited to)
Steps to Reproduce
- Kill the app (not backgrounded).
- Send notification to device with an option for a background action button
- Click the action button
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
Android 11
Cordova-Android version 9.1.0
(Android) Device Vendor (e.g. Samsung, HTC, Sony...)
Sample Push Payload
{
"data": {
"message": {
"title": "Title",
"body": "Body"
},
"actions": [
{
"title": "Yes",
"callback": "actionGenericQuestionYes",
"foreground": "true"
},
{
"title": "No",
"callback": "actionGenericQuestionNo",
"foreground": "false"
},
{
"title": "Maybe",
"callback": "actionGenericQuestionMaybe",
"foreground": "true"
}
],
"sound": "Default",
"notId": 12345
}
}
Notes
I've also tried a combination of:
- 'content-available': 1,
- 'force-start': 1,
- https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/PAYLOAD.md#application-force-closed
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels