Closed Alvish0407 closed 3 months ago
It’s likely from the Map api itself.
Shouldn't it be stopped ?
The sample app has an “email log” menu option.
you can fetch 3 days worth of logs to see what the plug-in is doing while disabled.
(18-19-20-21/08/2024) background-geolocation.log
Show me your lib/main.dart
I have downloaded app from the play store
The sample app’s code is in this repo /example folder.
it has a background_fetch HeadlessTask which calls .getCurrentPosition, no matter if background_geolocation is enabled or not. You don’t have to do that in your own app.
https://github.com/transistorsoft/flutter_background_geolocation/blob/master/example/lib/main.dart
Specifically this line calling .getCurrentPosition
, which you can clearly see being called in the logs.
background_fetch
is a completely separate plugin used for executing periodic events in the background (eg: every 15 minutes).
You're free to clone this repo and launch the /example app on your own device, modifying the code as-desired.
Got it. I didn't check the backgroundFetch
being used.
background_fetch
is a dependency of background_geolocation
and also created by me. Naturally, I like to test them working together in the /example app.