How to update monitoring window(listview) after each 5 seconds in android
<p>I am getting data from a url for the monitoring window which show the list of visitors visiting the site,along with their ip,session id,time to live to site,no. of visit and their status from that url.i have to show data in a listview and after each 5 seconds getting new data.how can i make the listview that set data getting from url and after each 5 seconds update the data getting from server(means each after 5 seconds add new data to list).</p>

<p>can anyone help me?</p>

<p>I am using the update method like following.</p>

<pre><code>    Handler handler = new Handler();
 Runnable updater = new Runnable() {

     public void run() {

       /*
        * Update the list 
        */




         getVisitorDetailFromServer();





       try {
          Log.i("UPDATE", "Handler called");
         // searchAdapter = getFeed(URL);

          handler.postDelayed(this, 3000);

       } catch(Exception e) {
          Log.e("UPDATE ERROR", e.getMessage());
       }

      }

     };

        updater.run();
</code></pre>

<p>i am getting data correctly now using this method but problem is that after some time app is being crashed java.lang.indexoutofboundsexception occurs.</p>
