创建于Android的推送通知 [英] Create push notification in android

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

问题描述

如何使用GCM或任C2DM我试图创建Android的推送通知,并检查一些网站并没有获得确切的answer.i需要知道它是如何works.Can任何一个向我提供推送通知好的教程

how to create push notification in Android using GCM or either C2DM i have tried and check some sites and didn't get exact answer.i need to know how it works.Can any one provide me good tutorial on push notification

可能有人帮助我。谢谢!

Could anybody help me. Thanks!!

推荐答案

它取决于你的需求是什么,你必须做的。

Its Depend on your requirement what you have to do.

<一个href="http://www.androidhive.info/2012/10/android-push-notifications-using-google-cloud-messaging-gcm-php-and-mysql/">here是C2DM 的示例:在此示例Android设备被注册wtih服务器服务器后发送按摩到所有的设备。所以单向通信(服务器到Android设备)

here is sample of C2DM: in this sample android device is registered wtih server after that server send massage to all device. so there is one way communication(server to Android device)

因此​​,所有的东西都在服务器端完成。只要下载这个教程。这两种服务器端(PHP)和Android code是可用。

So all things are done at server side. just download this tutorial. Both Server side(PHP) and Android code are available.

您得到了来自谷歌的服务,你必须把在服务器端应用的关键。

you got application key from Google services which you have to put at server side.

SENDER_ID - 谷歌的项目编号,你要当你想注册服务器设备发送

SENDER_ID – Google project id which you have to send when you want to register your device with server.

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

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