Google endpoints and Google Cloud Messaging

浪尽此生 提交于 2019-12-05 04:13:34

问题


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:


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.



来源:https://stackoverflow.com/questions/29144979/google-endpoints-and-google-cloud-messaging

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!