How to clean the memory back stack in profile on android app

12 Views Asked by At

i have create an android application that works good but have only one problem, the stack (i think is backstack) memory continue to increase every time i open and close an activity ( normal or tabbed with fragments ), how can i solve that ? I have serched in other question but all the solution that worked for other people doesnt work for me, can you tell me some different solutions to try? thanks to everyone, sorry for my bad english

I have try

intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); startActivity(intent);

And also

android:noHistory="true

And also

android:launchMode="singleTop

Intent intent = new Intent(this, MainActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent);

0

There are 0 best solutions below