Reputation: 6881
If I save an object in a bundle and then update my application, what will happen when I restore from the bundle? Can this happen or do the bundles get cleared when updating my application?
I mean if the a new version of the application is download and the structures no longer match. Since onCreate receives the bundle saved in onSaveInstanceState, the old one will no longer match
Upvotes: 0
Views: 79
Reputation: 30954
Bundles are per-se in memory data structures that allow to pass data from one activity to another.
If you want to keep that data, you need to persist it - either in preferences, a file or the database.
Updating your app means that the android system shuts down your app, wipes it from RAM (the latter two if needed), installs the new binary and then you can start it again. Thus RAM content is lost.
Upvotes: 1