Android examples for Activity:Activity Jump
jump to Activity With No History
//package com.java2s; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.os.Bundle; public class Main { public static void jumpWithNoHistory(Context old, Class<?> cls, int requestCode, Bundle mBundle) { Intent intent = new Intent(); intent.setClass(old, cls);/* ww w . j a v a 2 s . co m*/ if (mBundle != null) { intent.putExtras(mBundle); } Activity activity = (Activity) old; intent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY); activity.startActivityForResult(intent, requestCode); } }