지오 펜싱을 사용하려고하지만 정확한 위치를 사용자에게 알려주고 싶지 않습니다. ACCESS_COARSE_LOCATION을 (를) 사용하고 있습니다. 큰 지오 펜스 포인트 서클을 사용하면 ACCESS_COARSE_LOCATION이 (가) 제대로 작동합니다. 완벽하게 작동하지 않을 수도 있지만 사용자 위치에 대한 아이디어를 줄 것입니다.GeofencingApi를 ACCESS_COARSE_LOCATION과 함께 사용하는 방법
이 try {
LocationServices.GeofencingApi.addGeofences(
mGoogleApiClient,
// The GeofenceRequest object.
getGeofencingRequest(),
// A pending intent that that is reused when calling removeGeofences(). This
// pending intent is used to generate an intent when a matched geofence
// transition is observed.
getGeofencePendingIntent()
).setResultCallback(this); // Result processed in onResult().
} catch (SecurityException securityException) {
// Catch exception generated if the app does not use ACCESS_FINE_LOCATION permission.
logSecurityException(securityException);
}
같은 문서의 코드에서
하지만 GeofencingApi.addGeofences 권한을 FINE_LOCATION 할 필요가 있기 때문에 오류가 있습니다. 어떻게 COARSA_LOCATION을 사용하여 지오 펜싱을 사용할 수 있습니까?