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
The console.log in the eventListener method is triggered in case of data only notification. It works only when contents field is set. I assume this is correct behaviour because foregroundWillDisplay event must not be triggered when notification should not be displayed.
I need to handle data notifications when the expo app is in the foreground mode to refetch user's data. I send the following notification from the server:
Is there any way to intercept data notifications in JS code?
Thanks for any help.
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
max-baykalov
changed the title
[question]: Handling data (with content_available-true) notifications
[question]: Handling data (with content_available=true) notifications
Jan 25, 2025
How can we help?
We use OneSignal to handle notifications on Expo project. I faced an problem on version of react-native-onesignal: 5.2.5.
Code to catch notification in Expo app:
The console.log in the eventListener method is triggered in case of data only notification. It works only when
contents
field is set. I assume this is correct behaviour becauseforegroundWillDisplay
event must not be triggered when notification should not be displayed.I need to handle data notifications when the expo app is in the foreground mode to refetch user's data. I send the following notification from the server:
Notification data
Is there any way to intercept data notifications in JS code?
Thanks for any help.
Code of Conduct
The text was updated successfully, but these errors were encountered: