【问题标题】:How do I check if a specific user is running the app [duplicate]如何检查特定用户是否正在运行应用程序 [重复]
【发布时间】:2021-09-23 07:28:50
【问题描述】:

作为管理员...我想知道特定用户的手机上是否正在运行该应用程序..(如果应用程序在后台运行,则应该为假)...我使用 firebase AUTH 作为方法登录...

【问题讨论】:

标签: flutter firebase-authentication


【解决方案1】:

在您的 State<...> 类中,您需要实现 WidgetsBindingObserver 接口并监听小部件状态变化。像这样的:

然后当你想知道状态是什么时,检查 _notification.index 属性。 _notification == null => 没有发生状态变化,0 - 恢复,1 - 不活动,2 - 暂停。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-01-27
    • 2014-09-26
    • 2011-11-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-02-16
    • 2016-04-28
    相关资源
    最近更新 更多