I wonder if it's the best thing, since I would like to keep the service on.
Should you use another service model? Or is it OK as in the examples declaring it on Starter?
My need is to make a regular reading of the GPS position in the background
Yes, you need to add fine location to your manifest file. your app is for the play store, then you will be forced by Google to use SDK 26 by the end of this year anyway, so you might as well implement SDK 26 now.
FLP is extremely precise as far as I'm concerned, I use it to manipulate data using my watch, my watch doesn't have GPS built-in so it relies on the FLP data that was collected by my other devices (GPS via my phone in most cases). If you believe that you're having location issues, you should just make things easier for yourself and just use the GPS library only.
I did a test by replacing the FusedLocationProvider library with the GPS.
The measurements are accurate.
So I think the problem is of the network that does not correctly localize.
But another problem arises, with GPS the costumes are very high and Android signals the App as high consumption. And it's a problem because it has to go unnoticed
You could wake-up your app at given intervals (15 minutes could be ok?), then acquire a lock, save data to your remote server, remove lock, go to sleep 'till next wake-up time. This will save a lot of battery.
With a time interval of 30 minutes I costantly am below 1mAh.
You could wake-up your app at given intervals (15 minutes could be ok?), then acquire a lock, save data to your remote server, remove lock, go to sleep 'till next wake-up time. This will save a lot of battery.
With a time interval of 30 minutes I costantly am below 1mAh.