How can I start and implement a thread in an acitvity?
<p>I'm new in Android and I want to create and start a thread in my activity, but my problem is that I don't know in which method I have to implement and start it. My thread is simple and the code is shown bellow:  </p>

<pre><code>Thread  thread=new Thread(new Runnable(){ 
             public void run(){
                 i=i+1;

          try{
          Thread.sleep(2000);
         }
          catch(InterruptedException e){}
             }
     });
</code></pre>

<p>To start my thread I used :</p>

<pre><code>thread.start()
</code></pre>

<p>I tried to implement and start it in onCreate() but is not work properly and in onResume() I get Force Close. Thanks! </p>
