简体   繁体   English

使用Phonegap解析推送通知

[英]Parse Push Notification with Phonegap

I have an application where you log in and it gives you a user ID with parse. 我有一个您登录的应用程序,它为您提供了具有解析功能的用户ID。 I then have a script to send a push notification to a custom channel based on that user ID (userid_their unique ID). 然后,我有一个脚本发送推送通知,以基于用户ID的自定义频道(userid_their唯一ID)。 All of this is in javascript and I am going to package my app with phonegap. 所有这些都在javascript中,我将使用phonegap打包我的应用程序。 How can I get the actual app to receive the push based on the custom channel? 如何获得实际的应用程序以根据自定义渠道接收推送?

Thanks! 谢谢!

You will need a Plugin for this, have a look at this Push-plugin (iOS only) or that for Android and iOS. 你需要为这个一个插件,看看此推送插件 (仅iOS版),或 Android和iOS。

Also be sure to check out Raymond Camden's blog post about Parse.com with Phonegap. 另外,请务必查看Raymond Camden关于带Phonegap的Parse.com的博客文章

One method would be use a native plugin, as qefzec has pointed out. 如qefzec所指出的,一种方法是使用本机插件。

Another approach would be send the data to your server using ajax and then use Parse's restful API to transmit the data. 另一种方法是使用AJAX的数据发送到服务器,然后使用解析的REST API来传输数据。 You have to use their queries to make sure you are updating the correct installation or object. 您必须使用他们的查询来确保您要更新正确的安装或对象。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM