【问题标题】:Is it okay to allow "While Using the App" instead of "ALWAYS ALLOW" while foreground service is used?使用前台服务时允许“使用应用程序时”而不是“始终允许”是否可以?
【发布时间】:2022-01-24 04:24:20
【问题描述】:

使用前台服务时位置权限 ALWAYS_ALLOW 和 Only While Using the App 选项之间有什么区别。我正在开发一个始终使用位置权限的 SDK,我正在使用前台服务,可以允许“仅在使用应用程序时”权限而不是 ALWAYS_ALLOW

【问题讨论】:

    标签: java android sdk android-permissions foreground-service


    【解决方案1】:

    使用Only While Using the App选项没有问题,如果应用程序中的位置获取过程只会在应用程序在屏幕上打开时执行。

    如果你想在后台获取位置,你应该使用 ALWAYS_ALLOW 选项。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-02-09
    • 1970-01-01
    • 2016-03-02
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多