Top "Android-handler" questions

A Handler allows you to send and process `Message` and Runnable objects associated with a thread's `MessageQueue`. Each Handler instance is associated with a single thread and that thread's message queue.

Running code in main thread from another thread

In an android service I have created thread(s) for doing some background task. I have a situation where a …

java android multithreading android-handler
Handler vs AsyncTask vs Thread

I got slightly confused about the differences between Handlers, AsyncTask and Threads in Android. I've read quite a few blogs …

android multithreading android-asynctask android-handler
This Handler class should be static or leaks might occur: IncomingHandler

I'm developing an Android 2.3.3 application with a service. I have this inside that service to communicate with Main activity: public …

android memory-leaks static-classes android-lint android-handler
How to remove all callbacks from a Handler?

I have a Handler from my sub-Activity that was called by the main Activity. This Handler is used by sub-classes …

java android callback android-handler
Stop handler.postDelayed()

I call multiple Handlers by new Handler().postDelayed(new Runnable()..... How can I stop it when I click on back? …

android handler android-handler postdelayed
cancelling a handler.postdelayed process

I am using handler.postDelayed() to create a waiting period before the next stage of my app takes place. During …

android android-handler postdelayed
Android: When should I use a Handler() and when should I use a Thread?

When I need something to run asynchronously, such as a long running task or a logic that uses the network, …

android multithreading android-handler
When to use handler.post() & when to new Thread()

I'm wondering when should I use handler.post(runnable); and when should I use new Thread(runnable).start(); It is …

android android-handler android-thread
how to use postDelayed() correctly in android studio?

I have a countDownTimer and if the user does not hit the gameButton within the 12th second I want the …

android handler android-handler postdelayed
How to stop Handler Runnable?

I am using a handler in the following program and I want to stop it when i=5 but the handler …

java android multithreading performance android-handler