May 2, 2024

Facebook Apps May Be Draining Your Battery

Posted May 31, 2013 at 10:59pm by iClarified · 61586 views
Some users have been recently having battery life issues with their iPhone (including some of us here at iClarified) -- but it seems the culprit could be Facebook.

A developer's blog post (translated form German) has posted some useful insight into a posible cause for the battery life issue. Using Apple's own developer tools, the developer, Sebastian Düvel, found that Facebook Apps like Messenger and Facebook are racking up CPU time.

---

If you start an app, then it’s running in the foreground. Sure. If you press the home button, the app is not getting terminated but it’s suspended (the app is sleeping). If an app is sleeping it is frozen and is doing nothing (not using any CPU time), although it is using memory. But that’s a good thing: so if you return to that app it’s faster available, because the system does not have to start it, but simply unfreezes it. Apps can be terminated when frozen (either by the system when memory is running low or by the user using the multitasking switcher, which is normally not necessary).

Since iOS 4 there is multitasking. With that it’s possible for an app to keep running up to 10 minutes after being sent to the background. Unfortunately some apps are exploiting this. WhatsApp for example. When it seems like it’s terminated it’s actually running exactly those allowed 10 minutes and continues to communicate directly with it’s server instead of using iOS’ push notifications. That’s draining more battery, of course.
So if you are getting a message in this 10 minute timeframe and open WhatsApp, this 10 minute period starts again. That means if you are getting lots of messages it could happen that WhatsApp is running the whole day. Thankfully most of us are not that popular, so this would become a problem.

Additionally to this 10 minute background time there are four more multitasking modes. They all have something in common: they are running indefinitely. But more important they are defined by the apps themselves.

These four modes are:
●Playing audio: for apps like Spotify/Pandora who play music when you are doing something else
●Location based apps: this is for your navigation apps like Garmin or TomTom
●Newsstand downloads: Newsstand apps can download new issues in the background
●Voice over IP apps: this is for Skype and apps that allow to phone someone, they run in the background waiting for calls

---

Essentially, Facebook, for some odd reason, is waking up every few minutes, uses the CPU for 10 seconds, and then sleeps again. Initially this issue was thought to be related to chat, but that was not the case.

The only solution to this problem, according to Düvel is to either delete Facebook or quit the app using the multitasking switcher. This same problem occurs with Facebook Messenger and the iPad app as well.

We have not been able to verify Düvel's findings, so let us know in the comments if you have experienced better battery life by either removing Facebook or terminating the app after each use.

via Reddit