Save battery power consumed by gps services in android -
i developing application has 2 gps services. 1 of location tracking send location updates @ every 2 min server , service cyberseatbelt checks speed of device when location updates.
with these 2 services, battery consumption 77% displayed in mobile. without these 2 services, no battery consumption displaying.
is there solution save battery power on device while keeping desired functionality?
you have tell have done make battery consumption high. (not clear if battery becomes 77% after 1 minute or 15 minutes or 1 hr).
how accessing gps? running handler/thread periodically poll gps. if yes, wrong approach. can ask android inform on location changes.
gps services memory hungry. need gps services or looking location updates? android comes startup doco location based services . http://developer.android.com/guide/topics/location/obtaining-user-location.html try following steps in doco find best user location.
make sure stop listening updates @ appropriate time. users not happy 1 app tries drain battery when not running.
try making app background task.. i.e service or broadcastreceiver
Comments
Post a Comment