I have Ionic Angular app and I need location every 30s no matter if the app is in the foreground or the background. I have @capacitor/geolocation connected and it gives back location just fine while the app is in the foreground, but whenever it goes to the background I get no location back.
I’ve added android.permission.ACCESS_BACKGROUND_LOCATION along android.permission.ACCESS_COARSE_LOCATION android.permission.ACCESS_FINE_LOCATION in Android Manifest but still when I use Geolocation request permissions in the dialog I can give permissions for While I’m using the app and not always.
I also tried with capacitor-community/background-geolocation plugin which also works in the foreground but in background I got notification Location not available.
I’m testing on Pixel6 with the app running on phone from Android Studio and checking Run logs there.
Any help is appreciated!
1 post - 1 participant