Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Location updates stopping unexpectedly in background on Android #119

Closed
diachedelic opened this issue Jul 25, 2024 · 3 comments
Closed

Location updates stopping unexpectedly in background on Android #119

diachedelic opened this issue Jul 25, 2024 · 3 comments

Comments

@diachedelic
Copy link
Collaborator

@LukasGrubis has reported that the foreground service stops when the app is moved to the background for the second time.

OS: Android 14
Device: ???

@diachedelic
Copy link
Collaborator Author

Can the bug be reproduced using the example app?

@diachedelic
Copy link
Collaborator Author

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

@diachedelic
Copy link
Collaborator Author

I have attempted to fix this bug in v1.2.18, please test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant