Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GPS tracking and accelerometer

Do you think it's a good idea to check the accelerometer for movement in order to save battery when running a service which checks and sends GPS location? Or is the onLocationChanged method optimized in a way that this will not help since it's only called when the location changes anyway and checking the accelerometer uses battery too.

I was thinking I could turn my GPS tracking service on and off depending on accelerometer data. But if the system is already sufficiently optimized for GPS battery usage then maybe it doesn't make sense?

like image 752
Quadroid Avatar asked Mar 26 '26 17:03

Quadroid


1 Answers

I would say this isn't the best way to go about it but it's certainly possible. You wouldn't be able to tell the difference between walking to the bathroom and walking down the street.

I would give the location listener a try and depending on the criteria you use, you might not see such a terrible battery drain.

I believe there is also a way to have your app receive a location when another app receives a location. Piggy-backing on it's location update. Depending on the location needs of your app this might be enough for you.

like image 81
Lysandus Avatar answered Mar 29 '26 06:03

Lysandus



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!