How to Stop Apps From Being Killed Automatically in Android Marshmallow and Nougat

BY Steve Litchfield

Published 8 Mar 2017

top keyboard apps android 10

A slightly dramatic headline, admittedly, but accurate. You see, Android 6.0 and above uses new systems from Google to help extend battery life: ‘Doze’, which restricts what apps can do in the background when a phone is stationary and unused, and ‘App Standby’, which does much the same thing but is based on how long it is since you last used a particular application. In either case, certain applications can be accidentally affected – but here’s how to keep them chugging along.

Admittedly the problem isn’t huge – far from a showstopper, but if you’ve ever popped back into one of your favourite applications (e.g. by tapping on its homescreen icon), something that you use multiple times per day, and wondered why it’s having to reload from scratch, taking a few seconds, rather than simply appearing instantly on the screen, then the answer is that Marshmallow or Nougat’s power saving modes got in the way.

This applies to most incarnations of Android 6.0 and 7.0, but my tests were on the Google Pixel and Nexus 6P, which is about as generic and ‘pure’ as you can get in the Android world, of course.

In my case the main bugbear was Pocket Casts, the most popular Android podcatcher. I’d listen happily in the morning on my Nexus 6P, I’d leave a podcast paused and would then get on with my morning’s work. At lunchtime, I’d swipe down the notifications shade and the playback controls would have vanished! Puzzled, I’d then tap on the Pocket Casts icon on my homescreen and the familiar blank screen and ‘up’ animation would signify that Pocket Casts was starting up. Again. On a modern device like a Pixel or Nexus 6P, with 4GB or 3GB of RAM, there’s simply no way that applications should be closed this quickly.

After much testing, what seems to be happening is that App Standby is interfering, noting that I hadn’t used Pocket Casts for four hours, assuming I didn’t need it anymore, and so killing it. And along with the application also go the playback controls for the current podcast on the notifications shade.

But the issue isn’t limited to this one use case and application. Another well-known phenomenon is that applications which were working fine under Android 5.x suddenly can’t seem to stick around in RAM under Android 6 and 7 – this is because Doze suspends background activity which used to be allowed under Lollipop and the application crashes out, not being able to handle the new behaviour.

In either case though, there’s an easy workaround – you just have to know the right place to look in Android’s Settings. I’m using the two Google devices mentioned, so the setting may be slightly different under different manufacturer skins.

1. Head for the ‘Settings‘ app and then ‘Battery‘.

Battery optimisation screenshot

2. On the ‘three dots‘ menu, top right, you’ll find ‘Battery optimisation‘.

Battery optimisation screenshot

3. Here you’ll see a list of all applications which shouldn’t be ‘optimised‘ (for which read ‘can be handled by Doze and App Standby’) – by default the list is usually very small, with almost all apps enabled for ‘optimisation’. Which is fine for general users, but if, like me, you want a few applications to live outside of the new battery optimisations, then tap on the ‘Not optimised‘ pick list and choose ‘All apps‘.

Battery optimisation screenshot

4. As you’d expect, every application on your phone is listed (this may be quite long) – swipe down until you find the application(s) that you particularly want to always keep running. Tap on the application name.

5. From the two choices, check the box for ‘Don’t optimise‘.

Battery optimisation screenshot

6. Rinse and repeat for any other applications (as needed, though don’t go overboard or you won’t reap any of the benefits of having Doze and App Standby in the first place).

Keep an eye on your phone and its applications over the next few days and hopefully you’ll see an improvement in the availability of your previously terminating applications.

Do bear in mind that this settings change isn’t a cure-all way to force Android to keep an application open in RAM. When you run a RAM-hungry game, for example, the OS still reserves the right to reclaim memory and to close your other applications down. That’s just how a computer works!

PS. Do make absolutely sure that your phone is up to date in terms of system updates from the manufacturer, plus also triple check that all application updates have been applied in the Play Store.

PPS. If you’re technically minded, see also the external developer feature, which describes how this new feature of Android 6 and 7 works: Optimizing for Doze and App Standby