ACCESS_FINE_LOCATION 权限是否包含 ACCESS_COARSE_LOCATION 权限

huangapple go评论80阅读模式
英文:

Does ACCESS_FINE_LOCATION permission include ACCESS_COARSE_LOCATION permissons

问题

好的,以下是您要的翻译:

如果用户授予应用访问ACCESS_FINE_LOCATION权限,那么该应用是否也会自动访问ACCESS_COARSE_LOCATION API方法。

英文:

Good day i was wondering if the user grants an application access to the ACCESS_FINE_LOCATION permission if that application would also automatically have access to the ACCESS_COARSE_LOCATION API methods

答案1

得分: 1

正如您可以在LocationManager API旧版本的指南中看到的:

> 如果您同时使用NETWORK_PROVIDER和GPS_PROVIDER,那么您只需要请求ACCESS_FINE_LOCATION权限,因为它包含了两个提供程序的权限。(ACCESS_COARSE_LOCATION的权限仅包括NETWORK_PROVIDER的权限。)

简而言之:是的,如果您已经定义了ACCESS_FINE_LOCATION,您就允许访问ACCESS_COARSE_LOCATION。

英文:

As you can see in the LocationManager API and in an older version of the guide:

> 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.)

In short: yes, you are allowing to ACCESS_COARSE_LOCATION if you've already defined ACCESS_FINE_LOCATION.

huangapple
  • 本文由 发表于 2020年9月16日 16:26:48
  • 转载请务必保留本文链接:https://go.coder-hub.com/63916057.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定