gpt4 book ai didi

android - 如果我已经有 ACCESS_FINE_LOCATION,我可以省略 ACCESS_COARSE_LOCATION 吗?

转载 作者:IT老高 更新时间:2023-10-28 13:11:19 26 4
gpt4 key购买 nike

我有一个 GPS 应用程序已经在 list 中请求 ACCESS_FINE_LOCATION 权限,现在我想添加一个需要 ACCESS_COARSE_LOCATION 的库 (MoPub)。

我是否正确假设 ACCESS_FINE_LOCATION 就足够了,我可以从 list 中省略 ACCESS_COARSE_LOCATION 吗?

最佳答案

https://developer.android.com/guide/topics/location/strategies.html#Permission

Note: If you are using both NETWORK_PROVIDER and GPS_PROVIDER, then you need to request only the ACCESS_FINE_LOCATION permission, because it includes permission for both providers. (Permission for ACCESS_COARSE_LOCATION includes permission only for NETWORK_PROVIDER.)

简而言之:是的,如果您已经定义了 ACCESS_FINE_LOCATION,则不需要 ACCESS_COARSE_LOCATION

关于android - 如果我已经有 ACCESS_FINE_LOCATION,我可以省略 ACCESS_COARSE_LOCATION 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15310742/

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