processone / ejabberd

Robust, Ubiquitous and Massively Scalable Messaging Platform (XMPP, MQTT, SIP Server)
https://www.process-one.net/en/ejabberd/
Other
6.06k stars 1.51k forks source link

Pushing notifications to android #4000

Closed Yogesh-Dubey-Ayesavi closed 1 year ago

Yogesh-Dubey-Ayesavi commented 1 year ago

Well, I am creating an android chatting application, I want to push notifications to those users who are currently to active, through google's fcm how can I implement that? if it isn't possible, are there any other mechanisms to perform such operations?

Well I checked some issues earlier, i found

mod_push :{}

 mod_push_keepalive: {}

But i dont know how to use them can someone give some pointers. Thanks in advance.

licaon-kter commented 1 year ago

You have a special app that you published on Play or App Store, or you use Conversations or Monal or some app that are on Play or App Store?

Yogesh-Dubey-Ayesavi commented 1 year ago

You have a special app that you published on Play or App Store, or you use Converasations or Monal or some app that are on Play or App Store?

I haven't published it yet just playing around with it and testing in local environments.

What I want to implement is, whenever the user stops listening to the xmpp server for instance terminates the application, and in that time if some other user messages him, I want to push a notification to that user who stopped listening to the xmpp server regarding the new message mostly what all chatting applications do.

Well I'm having my own servers to push notifications what I want is how to trigger them if a user goes offline and receives a message.

Thanks and regards.

licaon-kter commented 1 year ago

Great, so you need an XMPP server like ejabberd, and a component to talk with Google/Apple, like https://github.com/iNPUTmice/p2 or https://github.com/monal-im/fpush

The message sending happens by default, but... depending how the app "stopped" say by user putting it in background, OS suspending, user killing the app, OS killing the app, they might get the message via push... or not.