In one of my app, which tracks user location continuosly while user is moving, I am using "Activity Recognition Api" and "FusedLocation Api" for detecting the user movements and then based on those movements capturing the location points.
Everything is working fine and locations are recording and showing correctly, but the problem is with battery consumption. My app is consuming high battery(if I use the app for 30 mins it is consuming around 5% of the battery).
These are the properties I have set for location updates:
mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);
mLocationRequest.setInterval(0);
If I setInterval
as some value(example : 2000), then the track path is not appearing good i.e there are many overlaps and zig-zags, so I have taken "0".
So my problem is with battery consumption, if anyone have the best way to implement the requirement with more battery efficiency, can you please help me.