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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T17:15:54+00:00 2026-06-01T17:15:54+00:00

I am aware this is most likely a very stupid question, but I just

  • 0

I am aware this is most likely a very stupid question, but I just cannot completely understand the point of Handlers. I know the idea is that Handlers execute on the main thread, and they seem to be most commonly used along with worker threads, but why cannot the worker thread just invoke methods on the calling Activity instead of said Activity creating the thread along with a Handler to receive messages?

Again, I apologise for the ignorance of my question, but all I’ve found online is tutorials on how to use Handlers and my Pro Android 3 book does not clear up my question (or I’m too stupid to understand it properly!)

Or, for that matter, why use them over AsyncTasks, which can modify the UI without problem?

Thank you.

  • 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-01T17:15:56+00:00Added an answer on June 1, 2026 at 5:15 pm

    When using handler (or message) each task becomes “serialized”.
    This has the advantage that there is NO concurrency and therefore no need to lock.
    It is much easier to make a message driven system stable than an multi-threaded one.

    By the way AsyncTask uses Handlers, too

    Using handlers directly give you more flexibility.
    For example you could schedule a message to be send in the future.
    Or you could abort an scheduled message.

    Handlers are a very powerful tool.

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

Sidebar

Related Questions

I aware that this will be a less programming question, but still... How can
This question is not language-aware. I wanna know how can I recognize a returning
OK, I am most likely just missing something basic but I am super frustrated
I'm aware that this is possible with the os module's os.system(color) function, but this
I'm aware of using syntax like this: (something) ? TRUE : FALSE But what
In this question , I was made aware of glob()'s GLOB_BRACE option that allows
Foreword tl;wr: This is a discussion. I am aware that this question is more
This is a somewhat subjective question, but I'd like to hear the pros/cons for
Most of you should be aware of this on going issue with Android: http://www.google.com/support/forum/p/Google+Mobile/thread?tid=49e2b1adea1aa11c&hl=en
Firstly I'm completely aware of this message and why it happens normally. It's not

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.