Java tutorial
//package com.java2s; import android.app.Activity; import android.content.Intent; public class Main { public static void startActivityClearTask(Activity activity, Class<? extends Activity> clazz) { Intent intent = new Intent(activity, clazz); intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION | Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK); activity.startActivity(intent); activity.overridePendingTransition(0, 0); } }