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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T11:22:24+00:00 2026-06-01T11:22:24+00:00

I am using ksoap2-Android for making and parsing my requests. How ever if i

  • 0

I am using ksoap2-Android for making and parsing my requests. How ever if i want to use it i have to do it asynchronous. So i choose to create a new Thread for that.

It looks something like that, i don’t post all my logic request and parsing because int this case it isn’t important.

  new Thread(new Runnable() {
            public void run() {

                String answer = WebServiceRequests.About();

                     try{

                     }catch (Exception e) {
                        // TODO: handle exception
                         e.printStackTrace();
                    }
            }
          }).start();

So i get request in answer string, but now how to update my GUI ? When i try i get exception that i can’t update in that thread.

Please post your solutions to this. If you used Handler or AsyncTask or even make to work with my example.

Thanks.

  • 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-01T11:22:25+00:00Added an answer on June 1, 2026 at 11:22 am

    AsnycTask is always the first recommandation, If you haven’t done this before, read this official dev guide, sample code:

    private class MyAsyncTask extends AsyncTask<Void, Void, String> {
     protected String doInBackground(Void... params) {
       String answer = WebServiceRequests.About();
       return answer;
     }
    
     protected void onPostExecute(String answer) {
       // Update UI.
       showDialog("Answer " + answer);
     }
    

    }

    To start your AsyncTask:

    new MyAsyncTask().execute();
    

    onPostExecute method is guaranteed to be called on UI thread at some point in the future, as soon as the background thread (AKA. doInBackground) is finished. The underlying framework handle all dirty work for us.

    Hope this helps.

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

Sidebar

Related Questions

i tried the example from http://www.helloandroid.com/tutorials/using-ksoap2-android-and-parsing-output-data to get request and response from a wsdl
I am using KSOAP2 to manage SOAP in Android but it use https for
I have looked at several tutorials using android and ksoap2. My service works fine
I have an Android app that fetches data from the web service using ksoap2,
Calling a .net SOAP1.1 web service from android using ksoap2 lib I met a
I am using ksoap2 API to call .net webservices from Android. I am getting
I am new to Eclipse and Android programming in general but I have been
I need an advice if you may. I want to use webservices in Android
I am consuming a dotnet webservice on android code using ksoap2.I can successfully call
I have an Android application that displays a list of names using checkboxes. 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.