gpt4 book ai didi

react-native - 如何使用 react-native-firebase 获取推送通知的数量

转载 作者:行者123 更新时间:2023-12-05 02:14:13 24 4
gpt4 key购买 nike

我想用 firebase 在 react-native 中设置每手徽章的数量。

firebase.notifications.setBadge(number)

如何获取号码?

最佳答案

您可以使用 firebase.notifications.getBadge(),如文档中所述:https://rnfirebase.io/docs/v5.x.x/notifications/reference/Notifications#getBadge

不过我纳闷了,好像不是收到消息的总数。我认为这背后的想法是,您向 onNotifications 添加(并为每条消息递增)一个 setBadge

但根本问题是(我认为这也是 Thread-Opener 的意思),我如何获得每个应用程序收到的消息总数。应该是可以的,因为Android中还在用: enter image description here

关于react-native - 如何使用 react-native-firebase 获取推送通知的数量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53854719/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com