capacitor-community / capacitor-community/background-geolocation
Failed to foreground service...
- Dominant language
- Java
- Stars
- 249
- Forks
- 79
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
Example app
On the first call of addWatch and request geolocation permissions
**To Reproduce**
Steps to reproduce the behavior:
1. Go to Example app on Android 14,15, 16 in debug mode
2. Click on +BG.
4. Look at Logcat
Failed to foreground service
java.lang.SecurityException: Starting FGS with type location callerApp=ProcessRecord{.....
and app donot move into background
After granting permissions, I restarted the app (removing it from the running processes), and everything worked fine. So, the error only occurred the first time it requested geolocation permissions.
**Expected behavior**
no errors
**Screenshots**
**Smartphone (please complete the following information):**
- Device: Redmi
- OS: Android 14, 15
Contributor guide
Assessment
This issue has not been assessed yet.