I am developing a location based android application which requires to retrieve location continuously in background.
- I am using a LocationManager for fetching location updates.
- I have written a service that implements the LocationListener and retrieves the location updates.
- There is an option provided to user to either turn on/off notifications. If notifications are off, I am calling stopService() when my app goes in background otherwise service keeps on running and mLocManager.removeUpdates() is not called.
This means if user keeps notification on, the service will go on requesting location updates. My biggest concern right now is battery drain. I know I must stop requesting updates at some point but my app needs receiving location continuously in background. Can anyone tell me how much average battery location updates may drain when I am using NETWORK_PROVIDER and requesting updates at an interval of 5 mins?
Also should I use LocationClient instead of LocationManager in order to improve performance? Or will it be ok if I continue with LocationManager.
It would really be great if someone could provide me a suggestion on how to efficiently receive location updates in app which continuously requires location data.