有没有办法在Android的一次通话中取消订阅所有解析通道

Posted

技术标签:

【中文标题】有没有办法在Android的一次通话中取消订阅所有解析通道【英文标题】:Is there any way to unsubscribe from all the parse channel in one call in Android 【发布时间】:2015-11-20 00:24:03 【问题描述】:

我正在开发一个 android 应用程序,一切正常。我只是想问一下,有没有办法在一次调用中取消订阅所有解析通道,而不是使用:

ParsePush.unsubscribeInBackground("channel1");

在谷歌上检查并解析 android api 没有找到任何方法。

【问题讨论】:

我想说你有你的答案。我认为 Parse API 没有文档中没有的方法。 【参考方案1】:

频道信息写在安装类中。只需清除“渠道”列即可。

ParseInstallation installation = ParseInstallation.getCurrentInstallation();
installation.remove("channels");
installation.saveEventually(new SaveCallback()   // or saveInBackground
    @Override
    public void done(ParseException e) 
        // TODO: add code here
    
);

【讨论】:

以上是关于有没有办法在Android的一次通话中取消订阅所有解析通道的主要内容,如果未能解决你的问题,请参考以下文章