Java tutorial
//package com.java2s; import android.os.Handler; public class Main { private static Handler back; public static void backQueue(final Runnable r) { back.post(new Runnable() { @Override public void run() { try { r.run(); } catch (Throwable e) { e.printStackTrace(); } } }); } }