Push Notification Clarification #2763
-
Hi, I don't want the client to be connected throughout the app. I only want the client to be connected if I navigate to the chat screen. So I disconnect the user if he is not in the chat screen by 'client.disconnect()' method. . But after disconnection onMessageReceived() is getting called but unable to get sender name and message details on push notification. I tried 'disconnectsocket' it's working for me but my doubt is that after calling 'disconnectsocket' wheather it will connect the user to the chat app?. Is there any solution to get sender name and message details on push notification message? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey @bibinkrishnan Sorry for the late response! You can just choose not to connect the user until you open a given Chat. You can also disconnect the user from the socket but connect it again once you're ready to join the chat screen. |
Beta Was this translation helpful? Give feedback.
Hey @bibinkrishnan Sorry for the late response!
You can just choose not to connect the user until you open a given Chat. You can also disconnect the user from the socket but connect it again once you're ready to join the chat screen.