Reputation: 2244
I'm trying to implement FCM Chat message application, ss of now just messaging is done. Functionality of this is explained below,
In ListView, I'm showing list of user. If logged in user clicks on any user in list, he can able to chat with him. This is happening now.
Is it possible to show FCM push notification whenever a user sends a message like whats app?
Upvotes: 1
Views: 899
Reputation: 11
You have to keep track of the notifications yourself. I store the notifications in a database and when the user opens a notification I update the notification in the database.
FCM is fire and forget.
Upvotes: 1
Reputation: 8851
You can either create a your server whose method you could call when a user sends a message or use firebase cloud functions.
I recommend firebase cloud functions , because they have realtime database trigger. Whenever data changes at any node , you get to write some operations based on it.
Upvotes: 1