I am looking for a way to Initialize all my game activities once and switch between them when needed. Is it possible if so how? How can I bring an Activity to front from another Activity without Initializing it again and not finishing the calling activity?
Asked
Active
Viewed 415 times
1 Answers
0
This is not possible with activities.
However to make it possible you could use fragments instead of activities, which is recommended to use anyway.

ramdroid
- 6,738
- 1
- 16
- 14
-
Can we do this with google Zxing 1.7 's Android CaptureActivity.java ,Make This Activity Alive in Background stack and when i click on my Scan Button Which is in my Application and also Google Zxing Client is also in my Application Package .I have been try with Activity Lunch as SingleTop,SingleInstance but this not working Every Time When click Button To Start Activity of CaptureActivity.java it's re-create from onCreate,and My Ultimate Goal to do this because every time after come back from Scan Activity ,when i again press Scan Button it's take delay to start that Activity. – Herry Feb 07 '12 at 12:30
-
You can not make Activities alive in background. You always have one activity loaded and that's the one in the foreground. – ramdroid Feb 07 '12 at 12:34
-
@ Yeah i known that Android Have Camera As Shared Resource and we must Release when done with scanning ,So is there any other way to get out of Delay between My Scan button Click and after that Starting of Scan Activity Here is my Code.Here is my Code that Used to start Activity – Herry Feb 07 '12 at 12:39
-
the problem is that when ever we close an activity Suppose A and goto B from A and then switch between A and B. The memory taken by these activities is not released on finishing them thats what make the application run slow.Starting a new activity will be assigned new memory..... – Jawad Amjad Feb 08 '12 at 05:10