Create a simple LooperThread

suggest change

A typical example of the implementation of a Looper thread given by the official documentation uses Looper.prepare() and Looper.loop() and associates a Handler with the loop between these calls.

class LooperThread extends Thread {
    public Handler mHandler;

    public void run() {

        mHandler = new Handler() {
            public void handleMessage(Message msg) {
                // process incoming messages here


Feedback about page:

Optional: your email if you want me to get back to you:

Table Of Contents