I develop app, which in service get location and send it to server. Service in background get location every 5 min(for example). Battery quickly dies, when GPS and Wi-Fi uses.. So, how can I save battery life ?
Thanks for help in advance!
Small question: Am I right to do request location updates every 5min code below? And is it correctly use requestLocationUpdates with NETWORK_PROVIDER and next with GPS_PROVIDER ? That necessary, when GPS not find signal, but Wi-Fi find signal and give coordinates. I do this:
locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 30000, 0, locationListener);
locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 30000, 0, locationListener);