I wish to have one application that runs in the background, which knows when any of the built-in applications (messaging, contacts, etc) is running.
So my questions
The ActivityManager class is the appropriate tool to see which processes are running.
To run in the background, you typically want to use a Service.