I have 5 activities in my application A, B, C, D and E. I do login from activity A and go to activity B. Once i am logged in i dont want to go back to A until and unless user logged off. So i have to navigate like B->C->D->E->B.
When i move forward from B->C on button click i use the following:
Intent myIntent = new Intent(v.context, GameClass.class);
startActivity(myIntent);
When i move from C->D->E on button click, i use the following
Intent myIntent = new Intent(v.getContext(), D.class);
startActivity(myIntent);
finish();`
Intent myIntent = new Intent(v.getContext(), E.class);
startActivity(myIntent);
finish();
I am using finish()
while moving from C->D->E because when I want to come back from activity E->B I do not want activities C and D in stack.
Also when I was not using finish()
, after reaching from activity E->B and again move from B->C, activity was directly jumping from B->E so I used finish()
.
When I do my work and return back from activity E->B, i call only finish()
; so that it comes back to activity B.
But some times it works and some times it directly reach to activity A. And when it doesn't work it gives this below line:
A/libc: Fatal signal 11 (SIGSEGV) at 0x00000008 (code=1), thread 14392 (Thread-44699)
I have added
android:allowClearUserData="true"
android:hardwareAccelerated="false"
in AndroidManifest.xml file but still no success.
Can anybody answer why it is working so weird?