Hello,
I think I get it now. Android actually wants it that way. The app is paused and android needs more memory it will close the least important app, usually the one not used for the longest time. Very interesting. There are a few exceptions, GPS is one.
That's the point! Furthermore an application can be killed by the system but their capture continue appearing into the application's list, so the user can change to that application again. Apparently the application is not terminated but we can only view an image capture of the application, so in fact the system can kill it and leave such capture only.
For this reason the "Pause" and "Resume" events exists: we can always save some application state in the "Pause" event (when our application enters in background) and then use the "Resume" event to restore the previously saved state. No matter if the application is killed or not after the "Pause" event.
A possible scenario can be the below one:
1º We start our application, which consists in a form to send information to our server.
2º We start to fill the form with some data, but, at that moment we receive an incomming call.
3º We go into the telephone application, so our application enters in background mode.
At this step we can use the "Pause" event in order to save the already filled form fields.
4º The phone call is not to large, so we just hangup and go back into our application.
At this point, if our application is not killed by the system, the "Resume" event is executed, so we can restore the state of our form in order to never loss the information previously provided by the user.
Now supose this other way in the same scenario:
4º We need to open others applications while we are answering the phone call.
5º The system are low of resouces, so begin to kill old applications to allow the new ones.
6º The phone call ends and we want to go back into our application to continue to fill the form.
At this point, if our application has been killed by the system before, then the "Resume" event is never executed. However, we save something previously in the "Pause" event, so, in any case, even if our application is restarted by the system or their "Resume" event is fired, we can fill our app's form with the previously saved data.
In fact this is what the user expect: they do not expect to fill the form from scratch again, and they don't understand if the applications has been paused, enters in background or killed by the system. They just expect the entered information is not loss and then no need to be provided again.
If we close our application by ourself we broke the above "circle", and, for example, no matter what the system shown in the applications' list: if we close the application, then the system always need to execute it from scratch, which is something more expensive compared to simply "resume" the application.