I am building a mobile app with a backend using google app engine, I'm using google endpoints for API calls. Now what I am wondering is if there is a possibility to use GCM on the same backend. At the beginning When I wanted to create a new module using android studio, I only found the possibility to create a backend with endpoints and another one with GCM, but nothing with both of them. Any clue? Thanks.
1 Answers
5
votes
Google Cloud Messaging (GCM) is a service that allows you to send push notifications from your server to your users' Android devices, and also to receive messages from devices on the same connection.
Whereas Google Cloud Endpoints consists of tools, libraries and capabilities that allow you to generate APIs and client libraries from an App Engine application, referred to as an API backend, to simplify client access to data from other applications.
So these are two separate techniques. But Google has provided a bridge between these two services with a github project that demonstrates:
- Setting up the Backend
- Debugging the Backend Locally.
- Connecting your Android app to backend.
- Registering devices with GCM backend.
- Testing device registration in emulator.
- Showing Push Notification from GCM backend.
- Deploying backend live to app engine.
- Finally, testing against a deployed backend.
Just click this link to get the github source code.