How to kill Android process if user opens youtube
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/6531627/how-to-restrict-android-device-to-not-open-some-specific-site-e-g-youtube-facebo">How to restrict Android device to not open some specific site e.g.youtube, facebook</a>  </p>
</blockquote>



<p>I am writing an application and a feature is that if the user opens youtube.com then not allow him to do this.</p>

<p>So I planned to kill the Android process if the user try to open it. I know that this code kills the process </p>

<pre><code>android.os.Process.killProcess(pid);
</code></pre>

<p>but How can I get pid(process id) of process if it open youtube. The problem is to get process id which opens youtube.</p>
