首页 > 解决方案 > 如何在我的 firebase 和 flutter 应用上创建实时用户数?

问题描述

我想在我的应用程序中包含一个文本框,显示应用程序当前有多少用户(并发用户)。我正在使用 Firebase 和颤振,我想知道是否有人有任何建议。我知道 firebase 会报告实时用户的数量以进行分析,但有没有办法获取这些数据并将其展示给用户?

标签: androidiosfirebaseflutterfirebase-analytics

解决方案


I would use a combination of a presence state watcher like here for each user and save the presence state on the database AND a simple cloud function that listens to the changes and increments or decrements the total counter.


推荐阅读