Google端点和Google云消息传递 [英] Google endpoints and Google Cloud Messaging

查看:114
本文介绍了Google端点和Google云消息传递的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用谷歌应用程序引擎构建了一个后端移动应用程序,我正在使用谷歌端点进行API调用。现在我想知道的是,是否有可能在同一个后端使用GCM。在开始的时候当我想用android studio创建一个新模块时,我只发现可以用GCM创建带有端点的另一个端点,但是两者都没有。任何线索? Google云消息传递(GCM)是一项服务,它允许您将推送通知从您的服务器发送到您的用户的电子邮件地址。

Android设备,也可接收来自同一连接设备的消息。



鉴于Google Cloud Endpoints包含工具,库和功能,可让您生成API和客户端库从App Engine应用程序(称为API后端)中简化客户端对其他应用程序的数据访问。



所以这些是两种独立的技术。但是,Google通过一个github项目为这两项服务提供了一个桥梁:


  • 设置后端
  • 在本地调试后端。

  • 将Android应用程序连接到后端。

  • 使用GCM后端注册设备。 $ b
  • 在模拟器中测试设备注册。

  • 显示GCM后端的推送通知。

  • 将后端实时部署到应用引擎。 >
  • 最后,针对已部署的后端进行测试。


只需单击此链接即可获取 github源代码


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.

解决方案

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.

这篇关于Google端点和Google云消息传递的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆