2
votes

I want to implement my own push notification server, more than a need for the product I want to know How it can be implemented.

I read documents for XMPP servers like tigase, ejabberd and openfire. I know that XMPP servers can handle online messages really straight forward, just like sending notifications as chat messages. Here is what I think is true:

Hypothesis: Having an OTT (i.e. Telegram), you can send notifications or chat messages by the XMPP client (the mobile app) and an XMPP server (i.e. ejabberd), or think of a pub/sub app that gets server status changes on a mobile device is using ejabberd as XMPP server and another XMPP client as an app on mobile.

My question is, if the hypothesis that I mentioned above is right, a push notification server would be a message queuing server to queue Pub/Sub messages for offline users and an XMPP server to send notifications/messages to online users.

Is it right? I can have my own GCM-like server by having a message broker to handle the queues and an XMPP server to handle message sending?

1

1 Answers

3
votes

You can definitely use an XMPP server like ejabberd to implement your own push notification service on Android. You need to have an application that stays constantly connected and will use the local Android API to display notification on the mobile when receiving a message.

On Android, receiving a notification is clearly separated from displaying it. It means you can receive it by any mean you like, but still display it as a standard notifications, even if it did not come to your device through GCM