Reputation: 10482
What will an ideal android app notification server architecture. I am developing an android in ionic
. It has a mqtt
server that serve chat purpose.
What i want is when my app receive a new message it should show the message as native notification.
What I am confuse is as I already have mqtt
server that can do real time messaging, do I really need to use google GCM for sending & receiving notification or I can serve my purpose with my existing configuration.
In my existing app I directly calling mqqt server from my android app for chatting purpose, so can it be same for notification also i.e. send a push notification directly from app just as a chat message.
Can anyone brief me about a push notification architecture implementation ?
Upvotes: 0
Views: 218
Reputation: 59608
Conceptually this should all work fine with just MQTT, no need for GCM.
The problem may be your use of cordova/ionic. It's been a long time since I looked at MQTT support in cordova, but to do push notifications properly you will need to run the MQTT client in a Android Service so it will stay running in the background and have it create notifications in response to received messages.
If the cordova MQTT support will not allow background services you will need to write your own extension.
Upvotes: 1