AI-generated Key Takeaways
-
Apps must declare permissions for each API method used, and the required permissions vary depending on the API methods and fence types.
-
The Snapshot API methods
getDetectedActivity(),getBeaconState(), andgetLocation()require specific Android permissions. -
The Fence API fence types
DetectedActivityFence,BeaconFence, andLocationFencerequire specific Android permissions. -
Some methods like
getHeadphoneState()in the Snapshot API andHeadphoneFenceandTimeFencein the Fence API do not require any permissions.
Your app must declare permissions for each API method that's used. The required permissions vary. It depends on the API methods and fence types used by your app. Reference this documentation to learn which permissions are required for each method.
Snapshot API
The following table shows the permissions required for each Snapshot API method:
| Method | Required Android permission |
|---|---|
getDetectedActivity() |
|
getBeaconState() |
android.permission.ACCESS_FINE_LOCATION |
getHeadphoneState() |
none |
getLocation() |
android.permission.ACCESS_FINE_LOCATION |
Fence API
The following table shows the permissions required for each Fence API fence type:
| Fence API fence type | Required Android permission |
|---|---|
DetectedActivityFence |
|
BeaconFence |
android.permission.ACCESS_FINE_LOCATION |
HeadphoneFence |
none |
LocationFence |
android.permission.ACCESS_FINE_LOCATION |
TimeFence |
none |