按使用谷歌应用程序引擎在Android的通知 [英] Push Notifications in Android using Google App Engine

本文介绍了按使用谷歌应用程序引擎在Android的通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在开发,用户创建存储在服务器上的帖子的应用程序。当另一个用户通过点击一个按钮显示在后的利益,我想通知使用推送通知该帖子的作者。我已经设置了使用云终端与谷歌App Engine的数据存储。反正我有可以使用这些端点来实现推送通知?如果不是有没有落实给我的当前设置推送通知另一个简单的方法?我已经开发页面上读到关于谷歌云消息但有些困惑。我一直跟踪的注册ID的,但我真的不知道从哪里里去。先谢谢了。

I am currently developing an app where users create posts that are stored on a server. When another user shows interest in a post by clicking a button, I want to notify the author of the post using push notifications. I have already set up the data storage using cloud endpoints with Google App Engine. Is there anyway I can use these endpoints to implement push notifications? If not is there another easy way to implement push notifications given my current setup? I have already read about Google Cloud Messaging on the developers page but was somewhat confused. I have kept track of the registration id's but I don't really know where to go from there. Thanks in advance.

推荐答案

您可以使用HTTP接口GCM服务器,这说明
Android开发页面

You can use the HTTP interface to the GCM servers as described in this Android developers page.

最简单的方式来做到这一点是通过使用Android SDK管理器,它会给你一个处理请求和响应建立到GCM的所有复杂的jar下载谷歌云端通讯的Andr​​oid库。

The easiest way to do it is by downloading the Google Cloud Messaging for Android Library using the Android SDK Manager, which will give you a jar that handles all the complexity of setting up the requests and responses to GCM.

为实现这一页的底部,对于在App Engine上推送通知,你可以用它来熟悉发送推送通知,然后根据需要进行修改的样本Java应用程序。

Towards the bottom of that page, there is a sample Java application for push notifications on App Engine which you can use to get familiar with sending push notifications and then adapt to your needs.

这篇关于按使用谷歌应用程序引擎在Android的通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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