android - 有什么方法可以在 Android 的一次调用中取消订阅所有解析 channel

标签 android parse-platform channel unsubscribe

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

ParsePush.unsubscribeInBackground("channel1");

检查谷歌并解析 android api 没有找到任何方法来做到这一点。

最佳答案

channel 信息写在Installation类中。只需清除“ channel ”列即可。

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

关于android - 有什么方法可以在 Android 的一次调用中取消订阅所有解析 channel ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32218556/

相关文章:

Android:本地服务可以独立于应用程序被操作系统杀死吗?

android - 在 RecyclerView 中实现粘性导航栏

java - 在基本应用程序中使用动态应用程序功能

ios - 我如何实现 CHTCollectionViewWaterfallLayout?

swift - 不重复地加载数据和追加

ios - 将 Parse.com 1.11.0 添加到 watchOS 2

django - 我在我的项目中使用 django、postgresql、redis、channels、Docker 工具。我对 Docker postgresql 镜像有一些问题

android - 新通知取消旧通知

协程 : Broadcaster stops working after first message

go - 按顺序从 golang channel 读取