Dynamic updating with ListView in android through xamp DB
<p>Hello everyone i am facing a problem in updating ListView items on runtime,Actually i am making android chating app and i want to dynamically update listview by data which came from xamp database.i used some code for that but i am not really able to understand it .Please help me. Here is my code.</p>

<pre><code>    final Handler handler = new Handler();
    final Thread thread = new Thread(){
        public void run(){
            arrayList.removeAll(al); //it removes previous list items
            getData(); //This gets json data from server
            handler.postDelayed(new Runnable(){
                @Override
                public void run(){
                    handler.postDelayed(this, 6 * 1000);
                }
            }, 6 * 1000);
        }
    };
    thread.start();
</code></pre>

<p>Please upadate me .</p>