1) what is looper,
A Class used to run a message loop on a messageQueue for a thread, BUT , it is essentially itsself a thread, think otherwise how it is able to do the loop work.
Check the source code of Looper, you will find it.
2) A clean thread has a messageQueue natively, while it doesn't have a looper natively, need the developer explicitly create a instance of Looper for a thread.
An Activity is a thread , with a default Looper already created by default ,so that user save doing that .
So a thread with a looper , actually has 2 threads. And a thread with a handler can work properly only when there is a looper with it, so has 2 threads.
3) Handler is
a) a tool that used to send or be sent messages or Runnable Objects to the messageQueue of the thread that host it.
!!!!looper is used to pickup the messages or Runnable Objects in the messageQueue, and dispatch them to the right handlers.
thread is a thread, looper is a thread, while handler is not a thread.
b) has the ability to process some messages by implementing HandleMessage,
=========================
There are two main uses for a Handler:
(1) to schedule messages and runnables to be executed as some point in the future; and ----- send/post message/runnables on its own thread.
(2) to enqueue an action to be performed on a different thread than your own.----different thread.
From one perspective:
As you can see, Handler combined thread/looper is able to post a runnable on both the thread hosting it and a new thread
ScheduledExecutorService create a new thread, and post a runnable to it to be excuted.
ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
scheduler.schedule(launchWelcomeActivityRunnable,2, TimeUnit.SECONDS);
From another perspective:
Handler, message queue, looper combination can be used communication between 2 threads.
ScheduledExecutorService only create a new thread to be excuted. It can not communicate between threads until handler/looper is created for them.