Android: Clear Activity Stack
Most of you are wrong. If you want to close existing activity stack regardless of what’s in there and create new root, correct set of flags is the following: intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); From the doc: public static final int FLAG_ACTIVITY_CLEAR_TASK Added in API level 11 If set in an Intent passed to Context.startActivity(), this flag … Read more