解析推送通知移除定期推送 [英] Parse Push Notification Remove Scheduled Push

查看:162
本文介绍了解析推送通知移除定期推送的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经计划使用云code解析推送通知。现在是有办法


  1. 更改通知的日期/时间。

  2. 删除进度此通知。


     VAR的查询=新Parse.Query(Parse.Installation);
        query.equalTo('GROUP_ID','XXX');        Parse.Push.send({
          其中:查询,
          数据:{
            警惕:你previously创造了今天的比赛一提醒
          },
          push_time:新的日期(2014,12,30)
        },{
          成功:函数(){
            //推送成功
          },
          错误:功能(错误){
            //处理错误
          }
        });


解决方案

目前没有的 NO 的API此方法。当他们的SDK任何重大更新已经发表我会更新我的答案。

一个解决办法是安排苹果/谷歌允许范围之内的本地推送通知,然后改变它在必要时。

相反,

另一种方式,你可以做到这一点,但将是code重型;但创建解析后端推送通知类。有指针的用户,并创建一个几列,一家专将是一个解析日期与拟议的通知时间。更新必要的时候,通过这种方式你没有锁定在石头设置一个通知方法的用户设备的操作。一切都通过云处理。

I have scheduled a parse push notification using cloud code. Now is there a way

  1. change the date/time of that notification.
  2. remove this notification from schedule.



     var query = new Parse.Query(Parse.Installation);
        query.equalTo('group_id', 'xxx');

        Parse.Push.send({
          where: query,
          data: {
            alert: "You previously created a reminder for the game today"
          },
          push_time: new Date(2014, 12, 30)
        }, {
          success: function() {
            // Push was successful
          },
          error: function(error) {
            // Handle error
          }
        });

解决方案

There currently is NO API methods for this. I will update my answer when any major updates to their SDK have been published.

A work around is schedule a local push notification within Apples/Googles allowance and alter it thereafter when necessary.

Conversely,

Another way you could do it but will be code heavy; but create a push notification class on Parse Backend. Have pointers to users and create a few columns, one specifically will be a Parse Date with the proposed notification time. Update when necessary through the users device actions that way your not locked down to the one notification method set in stone. Everything is handled via cloud.

这篇关于解析推送通知移除定期推送的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆