In android , Handler can be used to post / handle message, if I don\'t use a HandlerThread (pass its Looper to Handler), does that mean in this case Handler use MainThread (
Normal way to use HandlerThread like this:
HandlerThread thread = new HandlerThread("A Handler Thread");
thread.start();
Handler handler = new Handler(thread.getLooper()){
@Override
public void handleMessage(Message msg)
{
//....
}
};
Because HandlerThread can create a Looper for Handler, it is a kind of convenient way.
When you create a new Handler, it is bound to the thread / message queue of the thread that is creating it -- see official docs...