Use Handler.obtainMessage(int what, int arg1, int arg2, Object obj) to pass two int to the handler.