0

Request kind indulgence and help of developers on this esteemed forum to a non technical person,i.e. me, who is articulating difficulties faced by my developers.

We were testing our Messaging App built using mongodb, nodejs and ReactNative.

Issue I am facing is this:

  1. While chatting, we find that a few messages for which we have received Firebase Notification on top and read the message partially, didnt populate on our screen atall! Though it is very infrequent, still 1 lost message is too many.

  2. When App is cleared from RAM, if we send 20 messages, say 1 to 20, we have noticed that upto 6 or 7 Notifications alert come, After that, notification stops. Then when App is opened, other messages start populating on the screen.

My developer says that socket is going idle due to which messages are lost and Firebase Notification is not able to keep the background services running all the time and keeping socket active.

I have read past posts reg high priority Push Notifications and API 23 and Continuous Background Services and sent the link.

Would the forum guide us a bit on how to keep the background services running all the time?

Thanks and stay safe!

BSMitra
  • 19
  • 4
  • This may be helpful: https://stackoverflow.com/questions/61646186/not-receiving-firebase-cloud-push-notifications-in-android-app/61679827#61679827 – MarkWalczak Apr 21 '21 at 06:26
  • Thanks. Read and forwarded. It is confirmed that notifications are being sent as Data as suggested in that article. So would it mean we need to have a way to allow Notification "wake up" idle/disconnected sockets? – BSMitra Apr 21 '21 at 08:24
  • Is it relevant to state here that though notifications are sent through Firebase, messages are sent by server using socket. And no message is being retained in server after delivery. – BSMitra Apr 22 '21 at 12:31
  • Sorry, I can't help you with sockets, Did you try to use SocketKeepAlive? https://stackoverflow.com/questions/6565667/how-to-set-the-keepalive-timeout-in-android or https://developer.android.com/reference/android/net/SocketKeepalive – MarkWalczak Apr 22 '21 at 19:19
  • Read and forwarded. Sorry for delayed response as lots of people are down with Covid. – BSMitra Apr 25 '21 at 13:40

0 Answers0