【发布时间】:2014-04-23 04:09:12
【问题描述】:
我想使用 3.3 cordova 在 android 中实现通知,我是新手。我已经尝试了几个教程,但没有成功。可以解释一个简单的方法来逐步实现它吗?
谢谢
【问题讨论】:
标签: android push-notification phonegap-plugins google-cloud-messaging cordova-3
我想使用 3.3 cordova 在 android 中实现通知,我是新手。我已经尝试了几个教程,但没有成功。可以解释一个简单的方法来逐步实现它吗?
谢谢
【问题讨论】:
标签: android push-notification phonegap-plugins google-cloud-messaging cordova-3
此插件用于 Cordova,并允许您的应用程序在 Android 和 iOS 设备上接收推送通知。 Android 实现使用Google's GCM (Google Cloud Messaging) service,而iOS 版本基于Apple APNS Notifications。
循序渐进
1) PushPlugin
2) Implement Push Notifications in your PhoneGap Application
注意: 别忘了在你的页面中添加cordova_plugin.js和PushNotification.js文件。
【讨论】:
在 Android 和 IOS 中使用此 phonegap 插件进行推送通知。对我来说效果很好。
【讨论】:
您可以复制/粘贴此链接上的说明。
https://github.com/Pushwoosh/phonegap-3-sample-app
您需要的文件是:复制 index.js ,将 pushnotification.js 添加到 index.html ,将 pushwoosh 中的插件添加到 config.xml ,重要的是来自 google 的 API ID 和来自 pushwoosh 的 ID , IOS 和 Android 可以在 index.js 中输入这两个 ID。
【讨论】: