Aplicatia Facebook reduce autonomia bateriei iDevice-urilor

  iPhone-urile noastre au o autonomie a bateriei destul de redusa, iar timpii de functionare standard se reduc si mai mult daca utilziam anumite aplicatii, in special cele de mesagerie. Un dezvoltator de aplicatii pentru iOS a descoperit ca bateria iPhone-ului sau se consuma foarte repede fara ca el sa utilizeze dispozitivul extrem de des si desigur ca a dorit sa afle sursa problemei. Folosind o serie de aplicatii software ale Apple, el a inceput sa monitorizeze felul in care ruleaza aplicatiile in background si a descoperi ca aplicatia Facebook genereaza un consum excesiv de energie.

As said before the app is defining what it’s using. Facebook is using two of them: Audio and VoIP! That means the Facebook app could be active in the background the whole time. According to Instruments that’s not the case. Not quite. Looking at the flags in Instruments you can see that the app is waking up every few minutes, does something for 10 second and sleeps again. I let this run for two hours and as you can see in the rightmost column, the Facebook app is waking up at regular intervals, does something for almost exactly 10 seconds and sleeps again. The whole day long.

  Pe blogul sau explica in detaliu procesul de multitasking in baza caruia functioneaza aplicatiile, insa in cazul Facebook-ului vorbim despre activitate constanta a aplicatiei. Practic aplicatia lasata deschisa in background ruleaza la intervale regulate de timp cate 10 secunde, dupa care dispare din logurile de utilizare, revine, dispare si procesul continua cat aplicatia este deschisa in background. In mod normal aplicatia ar trebuis a devina inactiva dupa 10 minute de inutilizare, insa avand implementate functii VoIP si Audio, ea probabil ruleaza diverse procese, ramanand activa tot timpul cat este deschisa in background.

So it seems there are only two solutions for this problem:
1. delete the Facebook app
or
2. quit the Facebook app after every use with the multitasking switcher (press the home button twice in a short time, then you see a bar showing your apps, tap a little longer on one app and they start to shake, now hit the little minus on the Facebook icon)
Now the Facebook app is really terminated and is not running in the background any longer. But if you forget the terminate the app at least one time, it’s running in the background again.

  Acelasi lucru se intampla si cu aplicatii precum WhatsApp Messenger, ele fiind configurate special pentru a inlatura partial limita de 10 minute de functionare a aplicatiilor deschise in background. Singura metoda de a va asigura ca asemenea aplicatii nu va afecteaza semnificativ autonomia bateriei este inchiderea lor inclusiv din background cand nu le utilizati.

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.