Reputation: 423
I am very new to Android programming and I am trying to make an app that enables users to send and receive messages. I already have a database and Apache set up. I've already implemented login, registration of users and adding friends to chat with.
Now in order to send and receive messages, do I use Google cloud messaging service? But GCM requires to set up the backend on Google cloud, right? I already have a working backend, so how can I use my existing database and Apache server to implement messaging? Should I write a PHP script to send and receive messages to/from Android devices?
Upvotes: 0
Views: 145
Reputation: 59681
But GCM requires to set up the backend on Google cloud right
No you don't need a backend on Google Cloud. What happens is that you use your own server (called "third-party server" in their docs), to send messages to Google's GCM server (using CCS protocol) which relays it on your behalf to the phone.
The same happens in reverse: the phone sends messages to Google's GCM server which relays it back to your server.
Here are the docs on getting you started:
Upvotes: 1