0

I'm testing my app on Android 10(Q) device. I'm using FusedLocationProviderClient to get location updates after specific interval. I'm getting location updates with "Allow only while using the app" permission. But Geofencing event won't trigger if I didn't allow "Allow all the time(ACCESS_BACKGROUND_LOCATION )" permission. I just wanted to trigger geofence event when app is open(in foreground) without ACCESS_BACKGROUND_LOCATION permission. I have used BroadcastReceiver and PendingIntent to detect geofence event as per https://developer.android.com/training/location/geofencing this official document.

Any help will be great! Thanks!

1 Answer 1

1

Google's Geofencing API won't work without the ACCESS_BACKGROUND_LOCATION permission. It doesn't matter if your app is in the foreground or using a foreground service, to use the GeofencingClient your app must have the ACCESS_BACKGROUND_LOCATION permission.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.