-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Thank you for providing this excellent software!
We have had this issue since 7.0.0. I just tested 7.1.5 and the problem still occurs.
This was not an issue in Capacitor 6.
This happes only if phone is in airplane mode. Tested on Samsung S10e with Android 12.
When we call Geolocation.watchPosition() we get one callback that contains an error with message "Location settings error" and code "OS-PLUG-GLOC-0016". And the posisition is null. Then we get no more callbacks.
The options we use for watch is:
PositionOptions = {
enableHighAccuracy: true,
timeout: 20 * 1000, // 20 sec
maximumAge: 0, //we do not accept cached positions, ask for GPS position immediately
};When I debug the plugin itself I can see that the plugin get this exception in startWatch():
com.google.android.gms.common.api.ApiException: 8502: SETTINGS_CHANGE_UNAVAILABLE
I found a similar case here: android/location-samples#47
It is important for us that we can get position data in airplane mode, because our users need to save battery when they use our app in the field.
Is it possible that you can handle this quirk from Android API?