Previous android activity getting opened

view story

http://stackoverflow.com – In my application, I have created a notification feature through which Activity_1 gets called. In Activity_1 I have a Completed Task button which calls the following code: public void completeTask(){ taskDBAdapter.deleteReminder(rowId); taskDBAdapter.close(); Intent intent = new Intent(this, TaskManagerActivity.class); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.putExtra("CloseActivity", "true"); startActivity(intent); finish(); } Activity_1 oncreate code - @Override public void onCreate(Bundle savedInstanceState) { super.onCreate (HowTos)