Example communicating with HandlerThread

This is a working example: HandlerThread ht = new HandlerThread(“MySuperAwesomeHandlerThread”); ht.start(); Handler h = new Handler(ht.getLooper()) { public void handleMessage(Message msg) { Log.d(TAG, “handleMessage ” + msg.what + ” in ” + Thread.currentThread()); }; }; for (int i = 0; i < 5; i++) { Log.d(TAG, “sending ” + i + ” in ” + … Read more