title: How can i call API periodically?
body: <p>I am working in android. I want to draw a comment window. in which I have a list View which shows comment retrieved from a API.</p>
  
  <p>I want to call that API after 30 second again and again so i can show recent comments in my list view.</p>
  
  <p>This is the code which is used to call my API.</p>
  
  <pre><code>HttpClient hc = new DefaultHttpClient();                
  HttpGet get = new HttpGet("192.168.1.127/CC/comment");
  HttpResponse rp = hc.execute(get);
  
  if (rp.getStatusLine().getStatusCode() == HttpStatus.SC_OK) 
  {
      //Then put values in some text boxes.
  }
  </code></pre>
  
  <p>I want to call this above code again and again after 10 second. Please help me in writing code. Your may give a short example to solve this type of problem. I have very short time and dont have time to search on google so please help how can i call API and change UI periodically ?</p>