Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I send push notification with fcm through jabber server

I have developed a chat application for android using ejabberd as XMPP server. I want to send FCM push notification, when user is offline.

Can anyone help me or give an example for this ?

like image 982
Zain Ul Hassan Avatar asked Nov 23 '25 08:11

Zain Ul Hassan


2 Answers

You can add apllication to connect to FCM to your ejabberd, and send notification each time message goes to offline storage with this library

like image 117
Maryna Shabalina Avatar answered Nov 24 '25 22:11

Maryna Shabalina


I got your mail, I am answering here so it can help others. You should look into this erlang library that I wrote.

https://github.com/softwarejoint/fcm-erlang

The read me section has all the details.

So, your app registers its push token on server. Then when there is a particular event on server, server uses that token to send fcm a message. fcm in-turn sends the message to you.

Best Pankaj

like image 44
Pankaj Soni Avatar answered Nov 24 '25 23:11

Pankaj Soni



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!