When do I need android.hardware.location.gps and android.hardware.location.network?

后端 未结 6 524
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-23 20:17

Google is informing by email of changes to the Android location permissions:

We’re making a change on October 15th, 2016 that will affect apps targeting

6条回答
  •  别那么骄傲
    2020-12-23 20:53

    Yes you need both the permissions if you are using fused provider.

    ACCESS_COARSE_LOCATION - To receive location updates from NETWORK_PROVIDER. Adding android.hardware.location.network feature permission is enough.

    ACCESS_FINE_LOCATION - To receive location updates from both NETWORK_PROVIDER and GPS_PROVIDER. You should add both android.hardware.location.gps and android.hardware.location.network feature permissions. Applicable for also fused location.

提交回复
热议问题