Start camera activity in a thread and it runs twice
<p>I am using a thread, (tested Runnable, Asynch) to implement a delay and then start camera activity, but the problem is after taking a pic and returing back camera is launched again, so my camera activity is lunched twice, what could be the sol. I have used Runnable as well for implementing thread. Thanks.</p>

<pre><code>                  public void onCreate(Bundle savedInstanceState) {
                  Thread_as obj=new Threads_as();
                  obj.execute("");
                   }
                      ............

                  doInBackground(){
                  int timer=0;
            while(timer&lt;2000)
            {
                Thread.sleep(100);
                timer+=100;
            }}
   onPostExecute(){
    Intent it=new Intent(MediaStore.ACTION_IMAGE_CAPTURE);          
        startActivity(it);
</code></pre>

<p>}</p>
