【问题标题】:In Google cloud messaging for android在适用于 Android 的 Google 云消息传递中
【发布时间】:2012-11-08 05:20:19
【问题描述】:

在我的 android 应用程序中,我需要推送通知,所以我搜索了它,并在 android 指南 step by step procedure 上找到了 Google Cloud Messaging。

在编写 Android 应用程序时

第三步:编写 my_app_package.GCMIntentService 类

我需要创建从 GCMBaseIntentService 扩展的 GCMIntentService 类,我需要在 GCMBaseIntentService 和 onRegistered 方法中实现抽象方法(onRegistered、onUnregistered 等),我应该将 regid 发送到您的服务器,以便它可以使用它向设备发送消息.

我从here 获得了适用于 Android 的 Cordova GCM 推送通知插件示例

1)在那里我看到他们实现了 GCMIntentService 类(在 src/com/cordova2/gcm),在那个类中,看到 onRegistered 方法,在获取 json 之后我不知道他们为什么在调用 GCMPlugin.sendJavascript( json )第 39 行?。

2) 如何使用谷歌云消息来开发推送通知的客户端和服务器

【问题讨论】:

标签: java android push-notification google-cloud-messaging sencha-touch


【解决方案1】:

检查以下链接以获取带有服务器代码的 Android 推送通知= http://www.androidhive.info/2012/10/android-push-notifications-using-google-cloud-messaging-gcm-php-and-mysql/

【讨论】:

  • 请注意,不鼓励仅链接的答案,因此答案应该是搜索解决方案的终点(相对于另一个参考中途停留,随着时间的推移往往会变得陈旧)。请考虑在此处添加独立的概要,并保留链接作为参考。
  • 当然我会在下一个答案中避免
猜你喜欢
  • 1970-01-01
  • 2016-04-19
  • 2016-04-05
  • 1970-01-01
  • 2017-01-29
  • 1970-01-01
  • 2021-09-27
  • 1970-01-01
相关资源
最近更新 更多