kavie
kavie

Reputation: 2244

Achieve Chat Message Notification using FCM like WhatsApp

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

Answers (2)

ZieMijGaanJong
ZieMijGaanJong

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

Dishonered
Dishonered

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

Related Questions