My question is little bit different than these type of question. I need to remove or clear my activity stack then start a new activity. I don\'t think it is a clear_top flag
Try this,
Finish your current Activity
YourCurrentActivity.this.finish(); Intent intent1 = new Intent(YourCurrentActivity.this,LoginActivity.class); intent1.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(intent1);
It will work even your activity is not in the stack.
Hope it helps.