How to check if an app is really running?
<p>I want to check which apps are currently running on Android device.</p>

<p>I know there is getRunningAppProcesses() and that I can check the importance field but still I can't get good results.</p>

<p>The returned process are all processes, even those who are inactive, so I'm checking if the importance field is &lt;= IMPORTANCE_VISIBLE . The problem is that not all active apps are returned with this check.</p>

<p>I can give PowerAmp for example. If PowerAmp is in the foreground then it is returned with this check. but if it is only playing in the background, then it does not return.</p>

<p>How can I check if the app is actually active in the background? </p>

<p>I know it can be done since Tasker does it well.</p>

<p>Thanks.</p>
