Stay organized with collections
Save and categorize content based on your preferences.
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(), and getLocation() require specific Android permissions.
The Fence API fence types DetectedActivityFence, BeaconFence, and LocationFence require specific Android permissions.
Some methods like getHeadphoneState() in the Snapshot API and HeadphoneFence and TimeFence in 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:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-10-14 UTC."],[],["Apps must declare permissions for each API method used, varying by method and fence type. The `getDetectedActivity()` Snapshot API method and `DetectedActivityFence` require `android.permission.ACTIVITY_RECOGNITION` and `com.google.android.gms.permission.ACTIVITY_RECOGNITION`. `getBeaconState()`, `getLocation()`, `BeaconFence`, and `LocationFence` require `android.permission.ACCESS_FINE_LOCATION`. `getHeadphoneState()`, `HeadphoneFence`, and `TimeFence` require no specific permissions. Consult the documentation for specific method permission requirements.\n"]]