Java tutorial
//package com.java2s; //License from project: Apache License import android.os.Handler; import android.os.Message; public class Main { static Message obtain(Handler handler, Runnable runnable, Object obj, int what) { Message msg = Message.obtain(handler, runnable); msg.obj = obj; msg.arg1 = -1; msg.arg2 = -1; msg.replyTo = null; msg.setData(null); msg.what = what; return msg; } }