We are developing an Android application that has several actions that work in the wizard, for example: the user must go from action No. 1 to action No. 5 in order to proceed to completion (# 6).
Since we know that activity can be suddenly terminated by the OS on low memory, we used the Application class as a static storage for storing data that the user enters into the wizard actions and other data that our application requires for the entire session.
Unfortunately, we found that this approach fails - it seems that an instance of the application class can also be killed by the OS (this was specifically discovered in Android 1.6 vs. 1.5). Are our expectations wrong for this approach (we believe that an instance of the application class always lives on for the entire application session)?
So the question is, what is the best way to use Android to store data between actions / restarts for the entire application session?
android android-activity architecture session
Vit Khudenko
source share