Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70818

Geolocation in background (Ionic Angular Capacitor)

$
0
0

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

Read full topic


Viewing all articles
Browse latest Browse all 70818

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>