11

I have a Droid 2. I have a long, resource-intensive game (spectral souls) that I would like to leave running while I'm not using my phone. If I hit the Android "Home" button to get back to the home screen and then immediately re-launch the game, it will be right where I left off. Same if I hit the power button to sleep, and then immediately turn on the phone, unlock, and re-launch the game.

If I leave it for some amount of time (a few hours), then when I come back and launch the game, it starts fresh as if it were never running. The phone hasn't been used for anything in the meantime, although syncing is on.

My question is twofold: how can I get more information about what apps are killed when & why, and how can I set it up to allow this app to continue running? I don't need it to DO anything in the background, I just want it to still be there when I come back.

I'm familiar with the concept of Android clearing memory as it's needed and not needing a task killer, but I want it to not kill THIS task unless I really exit it.

2
  • I assume you don't have access to the actual code?
    – Nanne
    Commented Apr 9, 2011 at 6:42
  • Correct, these are closed-source apps purchased off the app store. Commented May 20, 2011 at 15:32

4 Answers 4

2

I am pretty sure that isnt an option in the default design of android. I have never personally seen an app for such things because most people desire the programs to shut down to keep the speed of the phone up. It is the android system that is shutting unused programs down. The creator of the app would have to design a service to keep it running in the background or possible like an always on calculation or audio so the system would think the program was doing something. That would eat up your battery.

1
  • While your first and third sentence are absolutely correct, the others are not.
    – Michael
    Commented Mar 25, 2013 at 4:19
2

Suggestion: Use Tasker to disable screen timeout for your app. This may prevent it from going to the background.

3
  • I'll take a look and try it out, thanks! I'll make note of any succeess or failure. Commented Apr 9, 2011 at 23:42
  • I can confirm that changing the screen timeout in Tasker will NOT prevent the app from getting killed. Thanks for the suggestion, though. Commented May 20, 2011 at 15:31
  • 1
    Wait, won't this prevent the screen from turning off? Thus wasting battery?
    – Michael
    Commented Mar 25, 2013 at 3:32
2

To the first part of your question;

how can I get more information about what apps are killed when & why?

The Android SDK has a quick summation on the Android Memory http://developer.android.com/guide/topics/fundamentals.html

By default, every application runs in its own Linux process. Android starts the process when any of the application's components need to be executed, then shuts down the process when it's no longer needed or when the system must recover memory for other applications.

So effectively Android can be summarized as killing programs when it determines you're not using it (I clicked quit in the app), or when it runs out of resources. For example, If you have 512 MB of ram, and 10 free and you launch an app that needs 12 it will try to determine the least used app it can grab 12 from.

It tends to do this pretty well (at least in my experience). You might be able to go home from your game, and do a couple things, but on the third thing it will evict the game. Keep in mind how resource intensive games in particular are, so it's likely it will kill that app sooner rather then later.

Now the reason it disappears after time, is that you likely have sync processes trying to start and compete for resources. The apps memory pages have been hit very infrequently at this point, so it's fair game to any memory reclamation the OS feels is necessary.

To your second question;

how can I set it up to allow this app to continue running?

I don't use a task killer, but I'm pretty sure the good ones (seems like ATK is the leader https://market.android.com/details?id=com.rechild.advancedtaskkiller&feature=search_result ) have an exception list. It might be possible to whitelist the game you want, and blacklist the other processes.

I'm also not familiar with this game, so I'm not sure what auto-save abilities and such this has. Hope I was some help.

0
1

How to get more information what apps are killed and why?

You can connect your phone to adb; and then turn on logcat ; saving output to file.
In log file you will have ton's of info; by searching for you app name; you can find out when it gets killed.

What can you do to prevent it from getting stopped by android system?
I don't know; hopefully rAndy answer will work.
However; I would contact the developer and tell him the problem, because he/she should have the easiest time to fix it

1
  • I was about to mention the logcat solution. Just want to add that you have too look for the ActivityManager (it's androids internal "task killer").You can not prevent android from killings app. The Android idea is that if an app process gets completely killed, the app should be able to restore it's previous state. So the app developers have to make sure that you don't start the game from the beginning.
    – Flow
    Commented Aug 25, 2011 at 21:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .