Closed diachedelic closed 1 month ago
Can the bug be reproduced using the example app?
In the example app, I created a single background watcher. Sending the app to the background via the Home button several times did not halt location updates. However, pressing the Overview button (which brings up recently used apps) logged the following error and halted location updates until the app was moved back to the foreground:
java.lang.SecurityException: Starting FGS with type location callerApp=ProcessRecord{4bb87e3 11768:com.equimaps.capacitor_background_geolocation_example/u0a434} targetSDK=34 requires permissions: all of the permissions allOf=true [android.permission.FOREGROUND_SERVICE_LOCATION] any of the permissions allOf=false [android.permission.ACCESS_COARSE_LOCATION, android.permission.ACCESS_FINE_LOCATION] and the app must be in the eligible state/exemptions to access the foreground only permission
I have attempted to fix this bug in v1.2.18, please test.
@LukasGrubis has reported that the foreground service stops when the app is moved to the background for the second time.
OS: Android 14 Device: ???