after specific seconds android request to the servlet for retrieving the new data if new data is available
<p>i just creating an android ap. so in that i created a connection with http to servlet. but i want that request is pass automatic after few seconds. so help me to find solution.</p>

<p>this is my connector class</p>

<pre><code>public String Intraday() { 
    String url = URL+"?flag="+"intra"; 
    httpPost = new HttpPost(url); 
    try{ 
        HttpResponse httpResponse = httpclient.execute(httpPost); 
        int statuscode = httpResponse.getStatusLine().getStatusCode(); 
        if(statuscode == 200){ 
            String responceMsg = getResponse(httpResponse); 
            return responceMsg; 
        }else{ 
            return null; 
        } 
    }catch(ClientProtocolException e){ 
        Log.e(TAG, e.getMessage(),e); 
    }catch (IOException e) { 
        Log.e(TAG, e.getMessage(),e); 
    }    
    return null;
}
</code></pre>

<p>this is the class from i calling my connector class now tell me where i put the code of thread??</p>

<p>try
        {   </p>

<pre><code>        String str = Connector.getInstance().Intraday();  //now tell me where i write 

        String st = new String(str);    
        Log.e("Main",st);
        String[] rows  = st.split("_");
        TableLayout tableLayout = (TableLayout)findViewById(R.id.tab);
        tableLayout.removeAllViews();                       

        for(int i=0;i&lt;rows.length;i++){
            String row  = rows[i];
            TableRow tableRow = new TableRow(getApplicationContext());
            final String[] cols = row.split(";");
            IntraThread popup = null;
            Handler handler = null;

            for (int j = 0; j &lt; cols.length; j++) {

                final String col = cols[j];                                 
                final TextView columsView = new TextView(getApplicationContext());
                columsView.setText(String.format("%7s", col));                              
                tableRow.addView(columsView);   

                if(j==0)
                {           
                    head= col;
                }
                if(j==2)
                {
                    price = Integer.parseInt(col);
                }
                if(j==4)
                {
                    target = Integer.parseInt(col);
                }

                if(j==5)
                {                       
                    handler = new Handler();                        
                    ltp = Integer.parseInt(col);                                
                    popup = new IntraThread(handler,head, target,ltp,price,Intraday.this,columsView);           

                }
                if(j==6){

                    popup.setColumnViewexit(columsView);
                    handler.postDelayed(popup, 300);
                }

            } 
            tableLayout.addView(tableRow);  
        }
    }                   

    catch(Exception e)
    {
        Log.e("Main",e.toString());
    }       
</code></pre>
