필수 권한
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
앱은 사용되는 각 API 메서드의 권한을 선언해야 합니다. 필요한 권한은 다양합니다. 앱에서 사용하는 API 메서드와 울타리 유형에 따라 다릅니다. 이 문서를 참고하여 각 메서드에 필요한 권한을 알아보세요.
Snapshot API
다음 표에는 각 Snapshot API 메서드에 필요한 권한이 나와 있습니다.
메서드 |
필수 Android 권한 |
getDetectedActivity() |
android.permission.ACTIVITY_RECOGNITION
com.google.android.gms.permission.ACTIVITY_RECOGNITION
(Android 9 (API 수준 28))
|
getBeaconState() |
android.permission.ACCESS_FINE_LOCATION |
getHeadphoneState() |
없음 |
getLocation() |
android.permission.ACCESS_FINE_LOCATION |
Fence API
다음 표에는 각 Fence API 울타리 유형에 필요한 권한이 나와 있습니다.
Fence API 울타리 유형 |
필수 Android 권한 |
DetectedActivityFence |
android.permission.ACTIVITY_RECOGNITION
com.google.android.gms.permission.ACTIVITY_RECOGNITION
(Android 9 (API 수준 28))
|
BeaconFence |
android.permission.ACCESS_FINE_LOCATION |
HeadphoneFence |
없음 |
LocationFence |
android.permission.ACCESS_FINE_LOCATION |
TimeFence |
없음 |
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-31(UTC)
[null,null,["최종 업데이트: 2025-08-31(UTC)"],[[["\u003cp\u003eYour app must declare permissions for each Awareness API method used, with specific permissions varying based on the method and fence type.\u003c/p\u003e\n"],["\u003cp\u003eRefer to the provided documentation to identify the necessary permissions for each Awareness API method.\u003c/p\u003e\n"],["\u003cp\u003eThe Snapshot API requires specific permissions for accessing detected activities, beacon state, and location, while headphone state requires no permission.\u003c/p\u003e\n"],["\u003cp\u003eThe Fence API requires specific permissions for activity, beacon, and location fences, while headphone and time fences require no permission.\u003c/p\u003e\n"]]],["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"],null,["# Required permissions\n\nYour app must declare permissions for each API method that's used. The\nrequired permissions vary. It depends on the API methods and fence types\nused by your app. Reference this documentation to learn which permissions are\nrequired for each method.\n\nSnapshot API\n------------\n\nThe following table shows the permissions required for each Snapshot API\nmethod:\n\n| Method | Required Android permission |\n|-------------------------|-------------------------------------------------------------------------------------------------------------------------------|\n| `getDetectedActivity()` | `android.permission.ACTIVITY_RECOGNITION` `com.google.android.gms.permission.ACTIVITY_RECOGNITION` (Android 9 (API level 28)) |\n| `getBeaconState()` | `android.permission.ACCESS_FINE_LOCATION` |\n| `getHeadphoneState()` | none |\n| `getLocation()` | `android.permission.ACCESS_FINE_LOCATION` |\n\nFence API\n---------\n\nThe following table shows the permissions required for each Fence API fence\ntype:\n\n| Fence API fence type | Required Android permission |\n|-------------------------|-------------------------------------------------------------------------------------------------------------------------------|\n| `DetectedActivityFence` | `android.permission.ACTIVITY_RECOGNITION` `com.google.android.gms.permission.ACTIVITY_RECOGNITION` (Android 9 (API level 28)) |\n| `BeaconFence` | `android.permission.ACCESS_FINE_LOCATION` |\n| `HeadphoneFence` | none |\n| `LocationFence` | `android.permission.ACCESS_FINE_LOCATION` |\n| `TimeFence` | none |"]]