Seriously. I switched back to an iPhone from Lollipop earlier this year, and the difference in battery life is staggering, even though the iPhone has a smaller battery than the Android phone I used to have.
I'm glad that Google has signaled that they are going to further tighten the restrictions on background app activities in future releases. I hope they follow through with it.
It's a trade-off. I hate that on iOS I have to have location services ON in order for, say, owncloud to back up my photos in the background. On Android, it just works in the background like it should. Sure, iOS saves on battery because of this, but I strongly feel I should have a say in this as a user. Some apps really should be allowed to run in the background.
Except everyone misuses such a thing, privacy gets violated, often don't test well for battery in many different conditions, and then users end up with a shit experience yet don't have the technical expertise to understand why (or which app is causing the problem). Android is particularly difficult since you can have a service running without an app present, so disabling it isn't very intuitive.
I think Apple has done a better job at this balance by not letting people shoot themselves in the foot at the cost the odd useful service not being possible.
Android's starting to head down this road in a better way - add more restrictions to prevent poorly written apps from draining your battery, but allow a override in settings to 'disable battery optimizations' for that app so the user still has control.
I have been on Android Beta on Nexus 6p and if I turn off the Now Cards, the phone takes 2 days to go from ~95% to ~45%. I do have to pay attention to how I keep the phone charged though... I always try to not charge beyond 95% and never let it drop below 40%.
Yea there's a bit of a disconnect between the two "things" stated in my comment. I guess what I was trying to say was that if I was not anal about hi and lo watermarks of the charge and didn't mind it dropping below 40%, and with Now Cards disabled... the phone could keep going between 3 to 4 days without charging.
I wonder if you could get the same effect by turning off only some of the Now cards. Perhaps a few of them are responsible for the majority of the battery usage.
It would be a shame to have to turn off all of them. I found most of them to be useful.
And with this, they just killed all actual apps for Android.
Anything you can do with an app you can do as well with a website.
Any actual app, not just a website in form of an app, which did computational task, data recording, or kept services available, is impossible to create now.
Run tracking app that doesn’t require you uploading your GPS data to Google Fit? Impossible.
Messaging app that doesn’t route all your private messages through Google Cloud Messaging? Impossible.
EDIT: before downvoting, read the comment below from morsch, he and I explained there pretty well the issues.
What on earth are you talking about? All of those things you listed as impossible will still be possible.
All Google did is restrict what apps can do in the background, and announced that there will be further restrictions in the future: all background tasks will have to be done through the JobScheduler API.
This does not prevent apps from doing stuff in the background, it just prevents them from doing whatever they want, whenever they want -- they will have to follow the proper procedure.
With Nougat, no background tasks will be run at all while the screen is off – except for Google services, or if they keep the CPU on 100% of the time with a wake lock.
JobScheduler also doesn’t allow continuous tasks, but only short tasks – so you can’t actually keep a low-cost socket open.
> With Nougat, no background tasks will be run at all while the screen is off – except for Google services.
Untrue.
First, mobile Doze doesn't kick in immediately when the screen is off.
Second, mobile Doze apparently doesn't stop all background tasks except "Google services" from running, since "wake locks" from apps for background tasks are still supported.
> Second, mobile Doze apparently doesn't stop all background tasks except "Google services" from running, since "wake locks" from apps for background tasks are still supported.
Except a Wake Lock has a significant battery impact, causing the CPU to stay on at all times.
There’s no way to keep your app running while also saving battery – which is the general ideal you want.
So, tell me, how do I keep a socket open without wasting battery?
________________________
A guarantee that, if the device has connection, the notification is transmitted within of 15 seconds, and that the device (in the case of the moto G 2014) gets still the 2 days battery runtime it’d get without the app.
That’s what I set as minimum goals for my app, and what I was able to get with older Android versions.
This is basically what iOS has done from the start.
If you don't see the app in front of you, iOS will very quickly kill it if it has any background tasks.
It's a leaky abstraction, but honestly I like the implicit promise/guarantee between the scheduler and the user.
I only get annoyed when I want some batch task like uploading photos, but even then it's not too hard to leave the phone powered on and unlocked on my desk until the photos upload...
Except when you try to ensure someone gets notifications while the phone is in an intranet.
Or when you try to transmit notifications without going through Google/Apple servers, because those require you to control the messaging server (due to API auth limitations), which does not work with distributed systems.
A messaging app that only works when the screen is on is useless.
Here's something he's referring to; messaging through Google's cloud infrastructure may be privileged[0]: "Like in Marshmallow, apps can still "punch through" Doze mode by sending a "high-priority message" via Firebase Cloud Messaging (formerly called "Google Cloud Messaging"). High-priority messages are the expected format for instant messaging apps, so users still get notified of messages when their phone is Dozing."
Hard to say whether this is one way to do it, or the only way. (E.g. "Unlike stationary Doze, wake locks (apps requesting the phone stay awake so they can do background tasks) are still allowed.")
I'm glad that Google has signaled that they are going to further tighten the restrictions on background app activities in future releases. I hope they follow through with it.