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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:33:07+00:00 2026-06-14T05:33:07+00:00

I am a bit stumped on a problem and forgive me as I am

  • 0

I am a bit stumped on a problem and forgive me as I am very new to android development. I did some searching and found quite a few differing opinions. I have an AsynchTask that calls a webservice and returns a bunch of json results. I have to (& want to) run my webservice asynchronously. the result set will need to be rendered inline within a RelativeLayout. I attempted to do this in my asynchronous thread but Android doesn’t allow updating the UI from anything that isn’t the main thread.

I see the Runonuithread but I can’t call my asynchtask from my ui thread.

What is the best way to call my webservice asynchronously, get the results, and then update the mainUI on the original thread. Is there a best practices from an architecture perspective.

  • 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-14T05:33:08+00:00Added an answer on June 14, 2026 at 5:33 am

    onPostExecute() is run on the ui thread, so try using that method to do your work. Otherwise, you can use the Handler class to communicate between threads.

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

Sidebar

Related Questions

I am a little bit stumped with the following problem and I am afraid
I am fairly new to c++ and I am a bit stumped by this
I have a small problem, but I'm a bit stumped. I am using the
I have quite a bit of experience with css and even this problem has
I'm a bit stumped on how (and where) to write some rspec tests for
A bit new to this whole web development thing still. This question will be
i'm bit stumped to know how to achieve favourite option i.e. i have a
I'm a bit stumped about how to perform the necessary cast in the following:
I'm a bit of a Fluent nHibernate newbie, so forgive me is this is
Ok, a bit stumped here, and instead of banging my head any more on

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.