Java tutorial
//package com.java2s; import android.app.Activity; import android.content.Intent; public class Main { public static void goHome(Activity parent) { Intent i = new Intent(parent, Main.class); i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP + Intent.FLAG_ACTIVITY_NEW_TASK); parent.startActivity(i); } }