5

I often switch back and forth between two apps (for example at the gym between JEFIT and Kindle app, or on the train between IRC and Firefox, or while hiking between a map/route app and the Camera), and many apps 'break' when they go to the back for too long - they lose track of what was going on or otherwise behave buggy.

Now that wasn't always the case, and with an older Android version, that only started happening when I had four or more apps to switch between. I'm guessing it's new optimization settings, but I'd very much like to either turn that off completely or turn it off for specific apps (some apps are more sturdy and don't suffer problems from this).

I know my device can physically handle those apps running at the same time because if I switch back and forth in under about 60 seconds, the apps stay loaded just fine.

So, anyone know what causes this, and how to configure this behaviour ? Settings, options, maybe a tweaking app ? I'm open to try anything.

Current config is Samsung Galaxy S3 running CyanogenMod 12 (which is Lollipop)

Torque
  • 359
  • A non-foreground app should be considered exited. It may come back unchanged, but there’s no guarantee. Some apps remember where exactly you were. Oh yeah, and there’s a dedicated SE for Android. – Daniel B Mar 15 '15 at 18:56
  • I updated my answer, you can try it but Android is not designed to work that way. – JeremiahBarrar Mar 17 '15 at 22:48
  • I'd answer my own question if it wasn't locked: the "App Settings" module for the Xposed app allows you to specify on a per app basis to keep apps from being killed or freed. – Torque Mar 22 '15 at 13:10
  • Does it actually work without causing problems? What about opening a suspended app 4 days and 20 other apps later? If it works I might give it a try. – JeremiahBarrar Mar 22 '15 at 15:17
  • @JeremiahBarrar I have been using it without reboot since you asked that question on the 22nd and it has worked perfectly for the two apps that I "stickied", without any noticeable system degradation. I have on multiple occasions opened an app that was suspended over a day later without it misbehaving. Would definitely recommend it. – Torque Apr 04 '15 at 09:13

1 Answers1

1

UPDATE: http://www.androidcentral.com/fine-tuning-minfree-settings-improving-androids-multi-tasking

More info here: "Simple answer: No. Android always uses OOM (Out-Of-Memory) prioritizing to free unused memory. You can change the priorities of apps (at least until reboot) with some task managers but even then if the memory runs low, apps in the background start getting killed.

Think about this scenario: you've downloaded a badly coded app which runs on boot, causes a buffer overflow and hogs all your memory. Normally, this app is killed, but if it's set to stay open it effectively bricks your phone until reboot, and after that starts again, and again, etc.

Some timers use services with high priorities to avoid this problem, but if you launch enough high-performance, resource-hogging apps while the timer is in the background, it will eventually get killed."

https://android.stackexchange.com/questions/25470/is-there-a-way-to-force-an-app-to-remain-running-in-the-background-no-matter-wha

  • 1
    That answer turned out incorrect or outdated. The "App Settings" module for the Xposed app allows you to specify on a per app basis to keep apps from being killed or freed. – Torque Mar 22 '15 at 13:09
  • @Torque Thanks for your comment, it works! I'll leave the link to your answer on the same topic here to help others find the correct solution: https://android.stackexchange.com/a/103226/136467 – Exterminator13 Apr 15 '19 at 14:45