Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4006662
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T08:32:29+00:00 2026-05-20T08:32:29+00:00

i just creating an android ap. so in that i created a connection with

  • 0

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.

this is my connector class

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;
}

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

try
{

        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<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 < 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());
    }       
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T08:32:30+00:00Added an answer on May 20, 2026 at 8:32 am

    Here is short of dummy code modify it to suit your needs

        String str;
        new Thread(new Runnable() 
        {            
            @Override
            public void run() 
            {
                while(true)
                {
                    str = Connector.getInstance().Intraday();  //This is edited code
                    Thread.sleep(few seconds);
                }
            }
        }).start();
    

    Replace the first line in Try String str = Connector.getInstance().Intraday(); //now tell me where i write with the code above provided

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just started creating android apps, but i have a problem changing the layout
I was just wondering how to request permissions when creating an android application. I
I have just finished creating an entire login and register systsem in PHP, but
I consider myself an Android developer, after having created four apps and learned a
Actually, I am facing a problem in Android. I am creating an application that
After reading some posts like this one: Choose File Dialog It appears that Android
I'm creating android app that has table layout for the main activity, and that
I am creating an Android app that will download and cache PDF files (the
I've been trying to teach myself Android, and have just learned that I've been
I am creating just a simple android app which will respond to received. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.