[question]: Dublicate foregroundWillDisplay
How can we help?
How can we help? I am using the event listeners as described in the setup guide, but when I receive a notification, the events fire more than 10 times. How can I fix this?
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Hello @ByDodo thanks for reaching out! We're looking into this. In the meantime, are you able to share the debug log from your device reproducing this? Thanks!
Same issue, using foregroundWillDisplay and testing one push notification triggers the event multitple times. However, the amount of triggeres seems to vary, it can be 1 but it can be like 20.
This is probably caused by #1015 as well.
@hen68: Can you confirm that this only affects Android?
@theigl I was testing it on iOS and having this issue, will have a look at Android as well
If it happens on iOS, then it must be a different issue. Thanks for checking.
removeEventListener does not remove the event lisener the way you would expect, as such, if you are using react and you hope to do cleanup in your useEffect, it wont happen and it will just keep readding addEventListener. So each time you save your stuff it will add another addEventListener, as a solution i just reload the app to have a clean state when testing foregroundWillDisplay.
Hi all, we made a fix related to adding listeners in Release 5.2.13.
Please check out the new versions, and let us know if your issue is resolved or not resolved by those changes.