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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T21:21:48+00:00 2026-05-31T21:21:48+00:00

when I read document about asyntask , they say that: should not update UI

  • 0

when I read document about asyntask, they say that: “should not” update UI thread in doInbackground because doInbackground work on different thread.

that means : this action will dangerous because UI Thread isn’t thread-safe. I understand it. but when I try for test what happen when I update UI Thread in this function. I receive error: (but error doesn’t not look like because aysnchonize, but because we CANNOT do it)

   (TextView)((Activity)context).findViewById(R.id.text)).setText("StackOverFlow");
//context: reference of context object of UI Thread

Please explain for me. Does we shouldn't or mustn't .

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-05-31T21:21:49+00:00Added an answer on May 31, 2026 at 9:21 pm

    what I have understand so far with android is…,

    we can’t update UI thread from background thread.
    May be it is the case they have stopped us to update UI from background thread.

    The reason for that is very clear… @ OS level there will be so many thread will be running.

    And also
    different thread from different application, And in that case It will be chaos on the screen, if we can update UI from bg-thread

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

Sidebar

Related Questions

I have read a document that they say: In java there two types of
I have read the ARM document about Cortex-M3 (or M0) and it say it
I read the SDK document, but can not understand some details, need some help.
I want to ask a question about the iPhone application. I read the document
I'm now struggling with UIImagePicker. I've read the document but it seems not to
I've read a bit about CouchDB and I'm really intrigued by the fact that
Well, I have read the document about Entity Proxy http://code.google.com/webtoolkit/doc/latest/DevGuideRequestFactory.html . As far as
I read the official document about supporting multiple screens http://developer.android.com/guide/practices/screens_support.html According to that document,
I must have read about arguments in functions and how they are variables and/or
I read document about universal app's and i read how to convert iphone application

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.