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
When user click action button Maybe then app comes to foreground but it doesn't call associate callback maybe_a function instead it calls "notification" callback function. If user click action button Accept then it calls associate callback accept_a function which is fine.
This issue is happening on iOS device only. on Android device, The associate callback function is getting called as expected.
Expected Behaviour
Action's callback should called when user click action on notification and app comes foreground.
Actual Behaviour
Instead of Action's callback app calls "notification" callback when app comes foreground.
Bug Report
When user click action button
Maybe
then app comes to foreground but it doesn't call associate callbackmaybe_a
function instead it calls "notification" callback function. If user click action buttonAccept
then it calls associate callbackaccept_a
function which is fine.This issue is happening on iOS device only. on Android device, The associate callback function is getting called as expected.
Expected Behaviour
Action's callback should called when user click action on notification and app comes foreground.
Actual Behaviour
Instead of Action's callback app calls "notification" callback when app comes foreground.
Sample Push Data Payload
{
"to" : "device token",
"notification": {
"title": "Test Notification",
"body": "This offer expires at 11:30 or whatever",
"click_action": "invite"
},
"data": {
"notId": 12332
}
}
Sample Code that illustrates the problem
function configNew() {
const push = PushNotification.init({
ios: {
sound: true,
alert: true,
badge: true,
categories: {
invite: {
yes: {
callback: 'accept_a',
title: 'Accept',
foreground: false,
destructive: false
},
no: {
callback: 'reject_a',
title: 'Reject',
foreground: false,
destructive: false
},
maybe: {
callback: 'maybe_a',
title: 'Maybe',
foreground: true,
destructive: false
}
}
}
}
});
}
Logs taken while reproducing problem
2021-06-23 14:51:40.667282+0530 Zimbra[8779:2069018] CDVWebViewEngine shouldReloadWebView::
2021-06-23 14:51:40.667579+0530 Zimbra[8779:2069018] CDVWebViewEngine shouldReloadWebView reload: 0
2021-06-23 14:51:40.669219+0530 Zimbra[8779:2069018] Push Plugin didReceiveNotificationResponse: actionIdentifier maybe_a, notification: {
aps = {
alert = {
body = "This offer expires at 11:30 or whatever";
title = "Test Notification 448484";
};
category = invite;
};
"gcm.message_id" = 1624440092415914;
"google.c.a.e" = 1;
"google.c.sender.id" = 23135529045;
notId = 12332;
}
2021-06-23 14:51:40.669431+0530 Zimbra[8779:2069018] Push Plugin userInfo {
actionCallback = "maybe_a";
aps = {
alert = {
body = "This offer expires at 11:30 or whatever";
title = "Test Notification 448484";
};
category = invite;
};
"gcm.message_id" = 1624440092415914;
"google.c.a.e" = 1;
"google.c.sender.id" = 23135529045;
notId = 12332;
}
2021-06-23 14:51:40.689015+0530 Zimbra[8779:2069018] coldstart
2021-06-23 14:51:40.689714+0530 Zimbra[8779:2069018] Warning: UNUserNotificationCenter delegate received call to -userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler: but the completion handler was never called.
2021-06-23 14:51:40.888974+0530 Zimbra[8779:2069018] active
2021-06-23 14:51:40.889089+0530 Zimbra[8779:2069018] PushPlugin skip clear badge
2021-06-23 14:51:40.892172+0530 Zimbra[8779:2069018] Notification received
2021-06-23 14:51:40.892788+0530 Zimbra[8779:2069018] Push Plugin key: alert
2021-06-23 14:51:40.892846+0530 Zimbra[8779:2069018] Push Plugin key: category
2021-06-23 14:51:40.907830+0530 Zimbra[8779:2069018] Push Plugin register success: {length = 32, bytes = 0x8bcf3cf5 b35673f0 feb89922 56dff4e7 ... b5b40621 f886413f }
2021-06-23 14:51:52.754927+0530 Zimbra[8779:2069018] {"message":"This offer expires at 11:30 or whatever","title":"Test Notification 448484","additionalData":{"category":"invite","google.c.sender.id":"23135529045","google.c.a.e":"1","coldstart":true,"notId":"12332","gcm.message_id":"1624440092415914","foreground":false}}
2021-06-23 14:51:52.755535+0530 Zimbra[8779:2069018] Push Plugin finish called
2021-06-23 14:51:52.774369+0530 Zimbra[8779:2069018] accept callback finished
2021-06-23 14:51:52.857388+0530 Zimbra[8779:2069018] Push Plugin stopBackgroundTask called
2021-06-23 14:51:52.857550+0530 Zimbra[8779:2069018] Push Plugin handlerObj
2021-06-23 14:51:52.858058+0530 Zimbra[8779:2069018] Push Plugin: stopBackgroundTask (remaining t: 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000)
The text was updated successfully, but these errors were encountered: