myhandler handler =new myhandler(); Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â // Create Inner Thread Class class background extends Thread { Â public void run() {Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Message msgObj = handler.obtainMessage(); Bundle b = new Bundle(); b.putString("message", msg); msgObj.setData(b); handler.sendMessage(msgObj);Â Â Â } } Â Â // Define the Handler that receives messages from the thread and update the progress class myhandler extends Handler { Â public void handleMessage(Message msg) { Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â if ((null != msg)) Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â String aResponse = msg.getData().getString("message"); Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â } Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â }