User push notifications in cordova 3.3

孤街浪徒 提交于 2019-12-31 04:08:33

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!