Re:Facebook iOS App Battery Explanation
by jobu on Thursday October 22, 2015 @06:43PM
(#10435640)
"The second issue is with how we manage audio sessions. If you leave the Facebook app after watching a video, the audio session sometimes stays open as if the app was playing audio silently. This is similar to when you close a music app and want to keep listening to the music while you do other things, except in this case it was unintentional and nothing kept playing. The app isn't actually doing anything while awake in the background, but it does use more battery simply by being awake. Our fixes will solve this audio issue and remove background audio completely."
So after all the accusations of Facebook exploiting background audio to steal cycles for downloading content or tracking people's location it's just another case of Hanlon's Razor.
Re:Facebook iOS App Battery Explanation
by bsbechtel on Thursday October 22, 2015 @07:28PM
(#10435879)
To be fair, accusations tend to fly faster when trust in maintaining users privacy has been previously eroded. When there is goodwill built up, people tend to be more forgiving.
Re:Facebook iOS App Battery Explanation
by eridius on Friday October 23, 2015 @01:09AM
(#10436904)
To be fair, it's hard to imagine that a company as massive as Facebook, with an application that's got probably the highest install rate on iPhone of any app not shipped on the device, would be so mind-numbingly stupid as to overlook such a prevalent battery-draining issue as this for so long.
Re:Facebook iOS App Battery Explanation
by matsur on Thursday October 22, 2015 @07:17PM
(#10435828)
We (Spire, building breath tracking wearables) have an unfortunate amount of experience troubleshooting these issues. The developer tooling around measuring battery drain/energy usage is not useful for debugging this sort of thing.
We ended up wiring a disassembled iPhone to battery simulation hardware and are now able to measure battery drain while stepping through a debugger/pushing the phone through an integration test to identify power usage regressions.
Re:Facebook iOS App Battery Explanation
by barkingcat on Thursday October 22, 2015 @10:22PM
(#10436464)
At mozilla - for B2G battery drain issues there is a project for building battery harnesses - the work of one man working in low level power measurements
Re:Facebook iOS App Battery Explanation
by CamperBob2 on Friday October 23, 2015 @12:52AM
(#10436868)
Curious how other folks handle these issues.
One approach might be to use a thermometer or IR camera to keep track of the phone's temperature relative to ambient. If something is causing unusual amounts of battery drain, the phone is going to get (much) hotter.
Re:Facebook iOS App Battery Explanation
by mey on Thursday October 22, 2015 @08:13PM
(#10436062)
I remember a presentation by Amazon at AnDevCon describing a similar setup they use internally as part of their validation. The built in Android battery profile wasn't sufficiently accurate to what was actually causing drain (most OEMs don't modify the default AOP power profile to represent what their system components actually consume in power). They actually went to the point to connecting into the battery electronics on the battery side to monitor drain. Unfortunately I don't see the presentation available online and this was at least 4 years ago.
Re:Facebook iOS App Battery Explanation
by cma on Thursday October 22, 2015 @08:23PM
(#10436089)
Recent talk by John Carmack mentioned the same, in their case they hooked up a measured DC power supply in place of the battery to measure power usage for GearVR
Re:Facebook iOS App Battery Explanation
by josephpmay on Thursday October 22, 2015 @06:46PM
(#10435655)
Importantly, this explains why a number of Facebook on iOS users were reporting that the app was showing background usage even when background refresh was turned off. Many people thought Facebook was using a private API to track people when they weren't using the app. In reality, it was just a mistake. This is a great example of Hanlon's Razor [1]
Re:Facebook iOS App Battery Explanation
by zacwest on Thursday October 22, 2015 @06:40PM
(#10435621)
It would be helpful if Apple included tracking on background time and other battery-usage metrics along with crash reporting for users that opt into it.
Facebook has no by-the-books way to realize some issues like this are happening, largely because iOS makes this difficult to watch.
Re:Facebook iOS App Battery Explanation
by 0x0 on Thursday October 22, 2015 @07:16PM
(#10435814)
I think the OP was talking about (aggregate) telemetry going back to facebook (crash reports yes, battery usage stats nope).
Battery stats telemetry is almost certainly only available to Apple, and not shared with third parties. (If you dig into your device's settings->logs, there are log files that seem to record every imaginable interaction with the device)
Also, for a long while, ios devices that have mounted the developer disk image provide some extra battery logging in settings, but that will only provide insight on the developer's own devices.
Re:Facebook iOS App Battery Explanation
by JaRail on Thursday October 22, 2015 @07:17PM
(#10435827)
But is that data reported back to the developer? When you have half a billion users, what anyone one person sees isn't very representative. This iOS 9 feature is focused on helping the end user (which is great), not the developer (which would also be great).
Re:Facebook iOS App Battery Explanation
by soccerdave on Thursday October 22, 2015 @07:27PM
(#10435875)
Doesn't an iOS app have to declare that it is going to do background audio? If so, what was their original legitimate use case for having background audio?
Edit: Here's a link to the apple docs that show apps have to declare what tasks they will perform in the background.
Re:Facebook iOS App Battery Explanation
by wppick on Thursday October 22, 2015 @07:30PM
(#10435888)
When I read the title I got excited because I thought that Apple had implemented some battery abstraction for iOS that gives a virtual battery to each application. Now I'm curious to know if there would be any benefit to something like that, or if it would be at all useful in any way?
Re:Facebook iOS App Battery Explanation
by orbitur on Thursday October 22, 2015 @07:59PM
(#10436007)
I hope there's a fix soon, because I'm tired of having to force-kill the app.
I don't know what tipped me off that Facebook was the culprit but I was driving one day and my podcast went quiet, like a notification sound was about to happen. But nothing came and the audio stayed quiet for at least 30 seconds before I pulled over, opened the app list, and killed Facebook. Problem solved.
Also, coincidentally, I forgot to kill Facebook last night and when I picked up my phone this morning it was warm. Glad I remembered to leave it plugged in.
Re:Facebook iOS App Battery Explanation
by dclowd9901 on Friday October 23, 2015 @12:11AM
(#10436759)
I would put your phone in low power mode. It seems to have all the benefits of straight up killing apps without having to bootstrap them each time you want to use them.
Downside of course is lack of push notifications and the like.
Re:Facebook iOS App Battery Explanation
by tomelliott on Friday October 23, 2015 @08:27AM
(#10438137)
>> Also, coincidentally, I forgot to kill Facebook last night and when I picked up my phone this morning it was warm. Glad I remembered to leave it plugged in.
Maybe, just maybe, it was warm because it was being charged.
Re:Facebook iOS App Battery Explanation
by jinahadam on Thursday October 22, 2015 @10:42PM
(#10436516)
force quitting might not work if you have push notifications enabled, you can get silent app notifications (content available notifications) and the app can be relaunched in the background.
Re:Facebook iOS App Battery Explanation
by IBM on Thursday October 22, 2015 @06:41PM
(#10435627)
Anyone know how to disable those Facebook notifications that say "Do you know X?". Can't find it in the options at all. Feels like an attempt to get engagement.
Re:Facebook iOS App Battery Explanation
by derefr on Thursday October 22, 2015 @07:49PM
(#10435962)
Alternately, you can grab the binary from the .ipa and decompile it. Objective-C/Swift code effectively can't be symbol-stripped; objc_msgSend takes a string selector, and those selectors remain evident in the binary. (This also makes writing cracks/keygens for Obj-C apps very, very easy.)
So after all the accusations of Facebook exploiting background audio to steal cycles for downloading content or tracking people's location it's just another case of Hanlon's Razor.
Autoplay: Never Autoplay Videos
We ended up wiring a disassembled iPhone to battery simulation hardware and are now able to measure battery drain while stepping through a debugger/pushing the phone through an integration test to identify power usage regressions.
Curious how other folks handle these issues.
https://hacks.mozilla.org/2014/04/measuring-power-consumptio...
One approach might be to use a thermometer or IR camera to keep track of the phone's temperature relative to ambient. If something is causing unusual amounts of battery drain, the phone is going to get (much) hotter.
[1] "Never attribute to malice that which is adequately explained by stupidity." https://en.wikipedia.org/wiki/Hanlon%27s_razor
Facebook has no by-the-books way to realize some issues like this are happening, largely because iOS makes this difficult to watch.
"To see how long each app has been open and onscreen, and running in the background, tap <clock icon>.
https://support.apple.com/en-ca/HT201264
Screenshot of the feature, since that page lacks it:
http://cdn.iphonehacks.com/wp-content/uploads/2015/06/ios-9-...
Battery stats telemetry is almost certainly only available to Apple, and not shared with third parties. (If you dig into your device's settings->logs, there are log files that seem to record every imaginable interaction with the device)
Also, for a long while, ios devices that have mounted the developer disk image provide some extra battery logging in settings, but that will only provide insight on the developer's own devices.
Edit: Here's a link to the apple docs that show apps have to declare what tasks they will perform in the background.
https://developer.apple.com/library/ios/documentation/iPhone...
I don't know what tipped me off that Facebook was the culprit but I was driving one day and my podcast went quiet, like a notification sound was about to happen. But nothing came and the audio stayed quiet for at least 30 seconds before I pulled over, opened the app list, and killed Facebook. Problem solved.
Also, coincidentally, I forgot to kill Facebook last night and when I picked up my phone this morning it was warm. Glad I remembered to leave it plugged in.
Downside of course is lack of push notifications and the like.
Maybe, just maybe, it was warm because it was being charged.
I guess we'll just have to trust this explanation?