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 ?
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 ?
You can add apllication to connect to FCM to your ejabberd, and send notification each time message goes to offline storage with this library
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
I faced the same task and finally solved it by writing my own Ejabberd module. I've stumbled over many problems since a lot has changed in later / the latest version(s) of Ejabberd.
Here's my Stackoverflow question where I just added my now working code for the module.
Maybe that help.