title: Preventing user from killing an application on Android
body: <p>I am trying to figure out how I can prevent a user from killing an application using force-stop.  I am trying to detect when user opens an activity such as Settings-Applications-Manage Applications and tries to force-stop a protected app.  Also there are some task manager apps that allow you to kill processes.</p>
  
  <p>I know it is possible in Android, since apps like AppLock or Super AppLock do it.  I just can't find any information on how to do it.</p>
  
  <p>Right now I am trying to poll ActivityManager.RunningTaskInfo to detect the restricted activities, however that does not work well as they have different names on different devices.  </p>
  
  <p>Is there a better way to do it?  How do AppLock and similar apps implement this functionality?</p>