Open tbeata opened 5 years ago
Any ideas? :) Please, it's really really important.
news about that?
I made similar changes in my code and ran into the same issue. The only thing that solved it for me was to remove the actionCallback
key from additionalData
in the notificationReceived
method. I don't know why this works, if I change the value of actionCallback
to a random string, I also do not get the notification event. If I rename the actionCallback
key to anything else, I do get the notification event.
I added the following condition above this line to prevent the actionCallback
from being added:
} else if ([key isEqualToString:@"actionCallback"]) {
break;
It would be really interesting to see whether this fix works for others, whether there is a better way to solve it and why it occurs in the first place. Although I do want to reiterate that this problem only occurs when interacting with foreground notifications.
Hi, Try changing: pushHandler.notificationMessage = userInfo; to pushHandler.notificationMessage = response.notification.request.content.userInfo;
in method:
This worked for me.
Here's my fork: https://github.com/tbeata/phonegap-plugin-push
That seems to work for same reason, the actionIdentifier
isn't added to response.notification.request.content.userInfo
. Thanks for the update.
Expected Behaviour
Trigger on(notification) handler when tappig notification with app in foreground.
Actual Behavior
Handler get triggered when notification arrived, but it doesn't when tapping on the notification.
Reproduce Scenario (including but not limited to)
I've modified the
But the on(notification) handler doesn't get called this time.
Steps to Reproduce
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
iOS 12.0.1
(Android) What device vendor (e.g. Samsung, HTC, Sony...)
Cordova CLI version and cordova platform version
Plugin version
2.2.3 with the above mentioned modification
Sample Push Data Payload
Please help me :)