1

I have 5 "main activities" A,B,C,D,E

App start with A and now can call A,B,C,D or E.

My problem is that when do A->B->C->A B and C call onDestroy() and when call newly to B or C start with onCreate()

I need that A,B,C,D and E never call onDestroy, because I need restart (if was create previously) in the same state before call onDestroy

1 Answers1

0

When you call your activity, you can try to take the running one and put it in the front with :

intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);  

I recommend you to check your Manifest if there is something like :

android:launchMode=["multiple" | "singleTop" ]

It is also possible that your device run out of memory and just needs to close an Activity and I don't think you can do much.

Helix
  • 1,259
  • 1
  • 9
  • 14