GPS Battery Drain - LocationManagerService

26 May 2018

GPS Battery Drain - LocationManagerService

GPS Battery Drain - LocationManagerService

Some users report about getting a quick battery drain in few hours. They have not installed any new apps that would have caused it.
It was noticed that phone was getting extremely warm in my pocket. Battery was almost completely discharged and went in to look at what caused the battery to drain so fast.
Top app on the stock Android battery usage settings was normal apps like Facebook, Twitter or Weather.

Using Better Battery Stats under partial wakelocks, the top two battery drainers were "NLP PendingIntent client in" (Maps) and "LocationManagerService".

The real issue is the functionality of LocationManagerService.

Newly installed app might have requested location updates with a frequency of few seconds, thus keeping the device busy.
Instead of requesting a "partial wakelock" with an appropriate auto-timeout, it might have requested a permanent one, which it needs to release explicitly.
If now this app crashed, the wakelock gets orphaned, the request for location updates remains, and reboot can resolve this problem.

The WiFi backend is also a passive listener for location updates so that it can get GPS locations when other apps enable the GPS.
So it should not be using very much power if the GPS is actually off.
It uses system resources when it gets a GPS update and scan for WiFi/WLAN APs and do some calculations to see if it needs to update its database.
In addition, apps that request GPS data usually request location information from all sources so they are likely to be requesting network based location through UnifiedNLP or GmsCore.

Recent Posts

Resolving Operating System Storage space in Android

Important Facts about quick charging in Android

Important facts about MIUI

Why some applications need a lot more permissions on update on new installation

Resolving Files and data moved to SD Card not scanned by Android

Security of Public WiFi networks

Trends of smartphone companies

HTC U11 life Camera Review

LG V30 Camera Review

GPU in Smartphones

Biometric authentication in smartphones

Important Features of Android Oreo

Dual Cameras in Smartphones

Optimization of Android Phone

LG V20 at a glance

Important Features of Huawei Honor 8

Facts about Android data stored on external SD Card

Advantages and disadvantages of limiting background processes in Android

Oppo F1s launched with 16MP selfie camera

First official Galaxy Note7 advertisement confirms some specifications

Risk of installing CyanogenMod on unsupported phones

Difference between Opera Mini and Opera mobile Browsers

Best Android browsers of 2016

Sony Xperia X Performance at a glance

How Google Maps estimate your location without GPS

Why Android have AntiVirus apps while they are few for iOS

iPhone 7 could be waterproof and can feature touch sensitive home button

Key features of iPhone SE

Can you upgrade the RAM of an Android device

How WhatsApp send audio files or video clips instantly © Copyright 2018, All Rights Reserved.