问题
I want to implement notifications in android using 3.3 cordova, I'm new at this. I have tried several tutorials but without success. Could explain a simple way to implement it step by step?
Thank You
回答1:
Cordova Push Notifications Plugin for Android, iOS and WP8
This plugin is for use with Cordova, and allows your application to receive push notifications on both Android and iOS devices. The Android implementation uses Google's GCM (Google Cloud Messaging) service, whereas the iOS version is based on Apple APNS Notifications.
Follow the given step by step
1) PushPlugin
2) Implement Push Notifications in your PhoneGap Application
Note: Dont't forget to add cordova_plugin.js and PushNotification.js file in your page.
回答2:
Use this phonegap plugin for push notification both in Android and IOS. It works fine for me.
https://github.com/phonegap-build/PushPlugin
回答3:
You can copy/paste the instruction on this link .
https://github.com/Pushwoosh/phonegap-3-sample-app
The files you need are : copy the index.js , to add pushnotification.js into your index.html , to add the plug in pushwoosh to config.xml and the important thing is API ID from google and the ID from pushwoosh , those two ID you can put in the index.js for IOS and Android .
来源:https://stackoverflow.com/questions/23234573/user-push-notifications-in-cordova-3-3