Reputation: 6188
Supposing an Android activity has some properties stored in the intent that created that activity, what happens to that intent and the stored properties when the view of that activity is destroyed. Are they revived when that activity is recreated?
Upvotes: 1
Views: 130
Reputation: 23638
As the onDestroy()
method will be called all the details of that activity will be lost if you have not stored it into any persistent storages.
In an activity’s lifecycle,onDestroy()
is the final call you receive before your activity is destroyed. This can happen either because the activity is finishing (or called finish()
on it, or because the system is temporarily destroying this instance of the activity to save space.
onDestroy()
is called only when system is low on resources(memory, cpu time and so on) and makes a decision to kill your activity/application or when somebody calls finish()
on your activity.
The onDestroy
method should clean up all the resources those were acquired by the onCreate
method and previously used by the now-destroyed activity.
Upvotes: 1