Rocket.chat react native app push notification not working if app is dead after sometime

Hi
I am facing a problem. I compiled/build the rocket.chat react native app and followed all the guidelines from rocket.chat documentation. app receives push notification from server when some other user send message but if the screen is locked for nearly 30 minutes. The push notification does ring the sound or show notification. If i press the power button of mobile which lightens the screen. All messages arrive suddenly. Then if within 30 minutes i send any message it arrives quickly even with licked black screen. My mobile is samsung A20s running android 9. Also tested on vivo v9 same behaviour. I am uaing fcm based notifications. Did all the battery optimizations in android. Otherwise the push notifications are working.
The only problem is when screen goes black or phone is locked. After 30 minutes push notifications arrive late or after very long time.

1 Like