When you first got your smartphone, did it have a good battery life? Has that since changed? This could be caused by badly-written third-party software.
To save power, Google’s Android OS keeps the components of the device it’s running on turned off unless they are needed, and requires applications to manage when they are turned on and for how long. Wakelock APIs (Applications Program Interfaces) are intended to keep a device running at full power when necessary. A group of researchers at Purdue University have discovered that mistakes in apps that use these APIs can leave components running all the time, draining the battery.
The team examined 187 applications that employ wakelock APIs, and discovered that 42 were using them incorrectly. “Programmers are only human. They make mistakes when using these APIs, which leads to software bugs that mishandle power control, preventing the phone from engaging the sleep mode. As a result, the phone stays awake and drains the battery,” said Professor Y Charlie Hu, one of the discoverers.
“These energy bugs are a silent battery killer,” said Hu. “A fully charged phone battery can be drained in as little as five hours.”
The group from Purdue is considering turning its research into an app that can find third-party software that causes unnecessary battery drain on user’s handsets.