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 7993817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T13:57:56+00:00 2026-06-04T13:57:56+00:00

I have in Android: HttpResponse httpGetResponse = client.execute(request); … Log.e(HEADER: , httpGetResponse.getStatusLine().toString() ); i.e.

  • 0

I have in Android:

HttpResponse httpGetResponse = client.execute(request);
...     
Log.e("HEADER: ",  httpGetResponse.getStatusLine().toString() );

i.e. I execute a HttpGet request and then do something with the response. Yet I want to somehow place it into a separate thread, so that the UI thread won’t freeze while the server responds. What do you think would be the best way to do that?

Thansk!

  • 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-06-04T13:57:58+00:00Added an answer on June 4, 2026 at 1:57 pm

    Wrap your request into an AsyncTask and do the actual request in the doInBackground. As you probably have to use the output on the UI thread you probably should return the data you need from within the doInBackground and use the postExecute option in AsyncTask.

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

Sidebar

Related Questions

I have an android client with a http GET request invoking a php script
I have an Android client that needs to authenticate with a python Google App
I have an HttpResponse object for a web request I just made. The response
I am developing an Android client for the site with authorization. I have a
I have a some text on an android client, I want to send it
Here is my code: DefaultHttpClient client = new DefaultHttpClient(); HttpGet request = new HttpGet(url);
I have used the following code on my client side (Android emulator). HttpClient client=new
I have a self-hosted WCF web service running, and an Android client application. I
I have just a curiosity question. I have an HttpPost request in Android that
I'm developing an Android app in which I have to do a POST request

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.