ConnectyCube / connectycube-reactnative-samples

Chat and Video Chat code samples for React Native, ConnectyCube
https://connectycube.com
Apache License 2.0
125 stars 111 forks source link

Push Notification does not appears, when it gets send from Connectycube Dashboard. #117

Closed technasir closed 3 years ago

technasir commented 3 years ago

Hello, i have followed the Push Notification guide from Connectycube documentation for React Native, i wanted to confirm something, that is it a default behavior that when i send a push notification from Connectycube dashboard, the notification never appears on the real smartphone device but onNotification() method from react-native-push-notification library gets fired though? If this is a default behavior then i should use local notification for displaying a notification in onNotification method? Thanks

banshiAnton commented 3 years ago

Hi @technasir, following react-native-push-notification library logic

https://github.com/zo0r/react-native-push-notification/blob/e37552da2dba120ab31a129abf30edfb496930c8/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNReceivedMessageHandler.java#L146

push notification can't display if app in foreground, but you can handle push data in onNotification js callback and create local notification

technasir commented 3 years ago

Thanks for your reply. @banshiAnton, Connectycube Push Notification never appears in background too. The onNotification() callback gets fired though. The Firebase Push Noifications appears in Foreground as well as in Background. So is it the default behaviour of Connectycube Push Notification that Push notification never appears but the onNotification() method gets fired when i send a notification from Connectycube. Thanks

banshiAnton commented 3 years ago

Thanks for reply Our team will investigate this issue

banshiAnton commented 3 years ago

Hi @technasir, do you use android or ios ? Can you please provide your device model and OS version? Because on our vivo 1820 when i send a push notification from Connectycube dashboard, notification can appears when app in foreground, background and after app kill

banshiAnton commented 3 years ago

Hi @technasir, any updates ?