Is there any way of finding when an application is closed (either by user or system) i.e the application can only be restarted by the user by pressing the application launcher icon.
I think it is only possible if Android system broadcast any Intent when a name of a process is removed from getRunningAppProcesses().
I have read all the possible Q&A on the SO and the question is not related with the ActivityLifecycle.
Hmm.. You can manually monitor /proc on the filesystem to see if the process id is present for the application you care about.
From your terminal window try the following. For example :
Replace com.mydomain.myapp with your apps package name
There are several apps available to monitor processes on android.
Take a look at http://code.google.com/p/android-os-monitor/
The android-os-monitor project uses a JNI layer to implement the interaction with /proc
http://code.google.com/p/android-os-monitor/source/browse/OSMonitor/jni/process.c?repo=osmonitor
http://code.google.com/p/android-os-monitor/source/browse/OSMonitor/src/com/eolwral/osmonitor/JNIInterface.java?repo=osmonitor
http://code.google.com/p/android-os-monitor/source/browse/OSMonitor/src/com/eolwral/osmonitor/processes/ProcessList.java?repo=osmonitor