Closed suyundukov closed 1 month ago
I thought it will use it only when user is near geofence point.
Your assumption was incorrect. Geofences are managed purely by the OS. How do you think the OS knows when the device is near a geofence: by periodically sampling the location.
the user will get that dialog once for the life of the app install. There’s no way to avoid it.
I was under the impression that geofences were managed by the operating system once the app set them up.
The app would specify the geofence's parameters and what to do when it's crossed, while the OS would take care of tracking the location and notify the app when needed, even if the app wasn't active.
However, it seems like the app is continuously tracking the location in the background, or am I mistaken?
But by the way it looks, app is constantly monitoring location in background or am I wrong on this one?
You are wrong. Your app is constantly monitoring location only if a solid location arrow is shown in the OS status bar.
see your device Settings Privacy and Security for more info:
If I’ve only set up a single geofence point, why is it showing that the app has accessed my location at multiple places?
How do you think the OS knows where you’re at so it can evaluate a geofence to ask “am I in this geofence?”
Isn't it the OS, rather than the app itself, that utilises location services in that case?
What does your privacy settings show for your app?
What does your privacy settings show for your app?
Allow Location Access: "Always".
Isn't it the OS, rather than the app itself, that utilises location services in that case?
According to Apple’s documentation, "the system monitors regions and wakes up your app as needed when conditions change between satisfied and unsatisfied states". Given this, why does it indicate that my app is using geolocation even when user is in a different country from the original geofence location?
After further investigation, I realized that the issue was actually on my side, and not related to the project. I apologize for the oversight and any confusion this may have caused. I'll be closing this issue now. Thank you for your understanding.
Your Environment
npx cap doctor
): @capacitor/cli: 6.1.2 @capacitor/core: 6.1.2 @capacitor/android: 6.1.2 @capacitor/ios: 6.1.2#ready
:Expected Behaviour
App uses background location only when needed.
Actual Behaviour
App uses background location all the time.
Steps to Reproduce
Context
I'm working with geofences and I want to show a notification whenever user is in geofence point. This is how I use it:
It works most of the time, but my biggest problem is that app is using background location all the time. I thought it will use it only when user is near geofence point.