如何在Android客户端应用程序上禁用Firebase通知 [英] How can I disable firebase notification on android client app

查看:74
本文介绍了如何在Android客户端应用程序上禁用Firebase通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当用户通过设置关闭通知时,我想禁用Firebase通知服务.

I want to disable firebase notification service when the user turns off notification through settings.

我发现了有关该主题的问题:

I found questions on this topic:

Android上的Firebase-我想要在Android客户端上禁用Firebase通知

android FCM启用/禁用应用程序设置

但是答案是忽略通知的另一种方法.

but answers are an alternative way for ignoring notifications.

还有其他方法可以注销Firebase通知.

Is there any other way to unregister firebase notifications.

谢谢

推荐答案

使用它.

FirebaseMessaging.getInstance().unsubscribeFromTopic("X");

这篇关于如何在Android客户端应用程序上禁用Firebase通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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