react-native-push-notification icon indicating copy to clipboard operation
react-native-push-notification copied to clipboard

Strange behaviour on android and IOS in onNotification

Open YulianLozynskyi opened this issue 4 years ago • 4 comments

Hi, thanks for your work. I have a question regarding remote push messages. So basically I've added configure() into the index.js and some strange behavior I see in remote notifications. I leave onNotification as it is, without any changes and handling of notifications and i still somehow get silent remote notifications but i don't see them in console (IOS), but i see them (in console) when i open them. On android on contrary, i see notification right away in console but not visually and nothing happens (in console) when i click on it. What can cause such strange behaviour? I've done everything step by step as you write in a readme. And another question: in onNotification method there is a comment "process notification", what is should mean basically? i should trigger local notification there or what? Thanks in advance

YulianLozynskyi avatar Dec 01 '21 15:12 YulianLozynskyi

Soooo, for the future smart-asses like me, firstly you should dive into bright world of how push notifications work and everything will work out (I mean silent, noisy and local push notifications). I've configured my backend accordingly and now I get proper noisy notifications after device was registered. But i have another issue, maybe it's platform specific but: when i get remote noisy notification on IOS i don't see it console, only when i open it and on ANDROID i see notification when it arrives but nothing happens when i open it? And for some reason when ANDROID app is in foreground I don't see visually this noisy notification?)

YulianLozynskyi avatar Dec 02 '21 08:12 YulianLozynskyi

anyone have the answer?

baonq-2356 avatar Dec 23 '21 03:12 baonq-2356

Hi, even i have a similar issue. Whenever I push notifications from my backend for android I sometimes get 2 notifications, one is silent and the other one as alerting. But sometimes it goes back to normal behaviour. I have observed quite a few trends. Below are the listed scenarios.

  • Whenever the app is in foreground, it is behaving normally.
  • Whenever the app is in background, i get 2 notifications and this scenario turns out to be working sometimes.

Anybody has any leads for this?

vishalc-jft avatar Jan 13 '22 11:01 vishalc-jft

Hi, even i have a similar issue. Whenever I push notifications from my backend for android I sometimes get 2 notifications, one is silent and the other one as alerting. But sometimes it goes back to normal behaviour. I have observed quite a few trends. Below are the listed scenarios.

  • Whenever the app is in foreground, it is behaving normally.
  • Whenever the app is in background, i get 2 notifications and this scenario turns out to be working sometimes.

Anybody has any leads for this?

Hey Please check if you're creating a local push notification. I had the same issue and I was able to fix it by removing the local push notification

akshayhalasangiremitbee avatar May 22 '22 18:05 akshayhalasangiremitbee

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Jun 11 '23 00:06 github-actions[bot]