Clear back stack : android api 11

150 views Asked by At

AS the question points out, i want to clear the back stack. I have gone through most of the links for example this and also found a question with a marked answer which could be flagged against this question

But, before it is marked as a duplicate, there are specific things happening in the app.

I have used the same code in the answer provided in the link here but since this does not work in api levels below 11, i used a code that would finish the activity if at all the activity is the next one in the stack.

I cannot use the singleTop keyword in the manifest as i need to maintain the activity, such that the user can get to the activity on pressing the back button

The CLEAR_TASK and also CLEAR_TOP and NEW_TASK flags work well with Honeycomb version and ice cream sandwich versions,

But, the same and also the patched code to finish an activity does not work on api level 11(JELLY_BEAN_MR1), it however works on JELLY_BEAN and also JELLY_BEAN_MR2 version codes.

Could anyone please guide me as to what i should do to clear the stack history?

Thanks

0

There are 0 answers