yydl
yydl

Reputation: 24474

Android - Activity Remains Open Debug

Is it possible for an Android activity to remain in memory, even after it's "finished" (e.g. a user presses the back button). And if it is, how can I debug whether this is the case?

Upvotes: 0

Views: 103

Answers (3)

Shailendra Singh Rajawat
Shailendra Singh Rajawat

Reputation: 8242

just save ur bundle , then setExtra(saved Bundle) to intent . because your activity creates from dis bundle only .... use preference/class variable to save it as pr ur need.

Upvotes: 0

Chris Stratton
Chris Stratton

Reputation: 40367

Yes, it's possible. But no, you shouldn't worry about it. Android may keep things around if it doesn't need to reclaim the memory, on the chance that the user might like to go back into them.

Upvotes: 1

Mark Mooibroek
Mark Mooibroek

Reputation: 7696

I don't think this is possible. Check the lifecycle, to be absolutely sure you can Override the onDestroy() method and debug there.

When you are passed this method you can be sure it is destroyed.

enter image description here

Upvotes: 1

Related Questions