How to know if a particular application is currently running?
<p>I am trying to build an application that can detect if the Messaging application is currently running so I can foreground one of my activity to prompt the user for a password.
<br></p>

<p>What I have done:
<br>
1)Created a service that starts running after startup.<br></p>

<p>Now, what is confusing me:<br></p>

<p>1)Is the messaging application a process, a thread, a task, or something else?<br>
2)What is its package name that i should write to check if running?</p>
