Implemeting推送技术在Android [英] Implemeting push technology on Android

查看:159
本文介绍了Implemeting推送技术在Android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个项目开发,实现推送技术的应用程序。我可以在消息的消息保存到我的时候添加一些消息的数据库,但我的问题是,我不能发送(广播)到客户端,我无法实现客户端接受消息(接受广播消息)。
我使用Spring,Hibernate和Tomcat的服务器,我已经基于Android客户端。

I have a project to develop an application that implements push technology. I can save the message to a database when I add some message, but my problem is that I can't send (broadcast) the message to the client and I can't implement the client accepting the message (accept broadcast message). I'm using Spring, Hibernate, and Tomcat for the server, and I've built the client on Android.

我曾尝试在这个问题的所有环节,但我还在原地感到困惑如何实现源$ C ​​$ C。

I have tried all the links in this question, but I'm still confused about how to implement the source code.

推荐答案

有关GCM,一个解释是可用的这里

For GCM, an explanation is available here.

有关这一点,你需要得到来自API控制台项目的API密钥。
另外,你需要在谷歌云端通讯的Andr​​oid库将在你的Andr​​oid SDK /额外目录是可用的。

For this you need to get an API key for your project from the API console. Also, you need the Google Cloud Messaging for Android Library which will be available in your Android SDK/extras directory.

如果你正在寻找客户端和放大器;解释与服务器端的例子,他们是在<一个很好的解释href=\"http://www.androidhive.info/2012/10/android-push-notifications-using-google-cloud-messaging-gcm-php-and-mysql/\"相对=nofollow>这个博客。

And if you are looking for both client & server side examples with explanations, they are explained nicely on this blog.

这篇关于Implemeting推送技术在Android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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