Open Android activity when user switched to foreign application
<p>I need to prevent some Android applications from execution. When foreign application launched, I need to check process name, and open a activity, with protection banner, if launching this application is prohibited.</p>

<p>The sample application in Google Play with this capability, is "App Lock" (<a href="https://play.google.com/store/apps/details?id=com.domobile.applock&amp;feature=search_result#?t=W251bGwsMSwxLDEsImNvbS5kb21vYmlsZS5hcHBsb2NrIl0." rel="nofollow">https://play.google.com/store/apps/details?id=com.domobile.applock&amp;feature=search_result#?t=W251bGwsMSwxLDEsImNvbS5kb21vYmlsZS5hcHBsb2NrIl0.</a>)</p>

<p>Can anybody give me some advices, how to do this?
Thanks.</p>
