How to prevent access to apps on android?
<p>There are quite a few apps that do what I want to do (eg: <a href="https://market.android.com/details?id=com.cc.applock&amp;hl=en" rel="nofollow">https://market.android.com/details?id=com.cc.applock&amp;hl=en</a> - this works well ). However I want to make my own (private) app that does this, and I can't figure out how. Can someone point me in the right direction on how to do this?</p>

<p>Edit: To clarify, I want to know how apps like App lock work, as in what APIs do they use to capture/monitor 'clicking' on apps, so that they can prevent access to them.</p>

<p>Edit 2: I think it works by using Process process = Runtime.getRuntime().exec("logcat -s ActivityManager:I");</p>
