Top "Ondestroy" questions

Tag for questions related to Android's onDestroy() method of Activities and Services.

Android activity life cycle - what are all these methods for?

What is the life cycle of an Android activity? Why are so many similar sounding methods (onCreate(), onStart(), onResume()) called …

android lifecycle oncreate onresume ondestroy
What is Activity.finish() method doing exactly?

I'm developing android applications for a while, and followed a lot of posts about activity life cycle, and application's life …

android activity-lifecycle ondestroy application-lifecycle
Activity OnDestroy never called?

I am using following code in my ListActivity // a separate class in project public class MyActivity extends ListActivity { // some common …

android ondestroy
Android Activity onDestroy() is not always called and if called only part of the code is executed

onDestroy() is not always called. If called, only part of the code is executed. And most of the time in …

android ondestroy
Android save state on orientation change

I've got an Android application which maintains state regarding distance traveled, time elapsed, etc. This state I can conveniently store …

android state ondestroy android-bundle
Android: Will finish() ALWAYS call onDestroy()?

Simple question: can you be sure that finish() will call onDestroy()? I haven't found any confirmation on this.

java android ondestroy activity-finish
What exactly does onDestroy() destroy?

I've been bothered by this "characteristics": When I use Back button to leave my app, I can tell onDestroy() is …

android ondestroy
Activity's onDestroy / Fragment's onDestroyView set Null practices

I am reading ListFragment source code and I see this implementation: ListAdapter mAdapter; ListView mList; View mEmptyView; TextView mStandardEmptyView; View …

android android-activity android-fragments ondestroy
android is there any view callback when it's destroyed?

I have a custom view component. I used it in either fragment or activity. I would like to know if …

android view callback ondestroy
Android app doesn't call "onDestroy()" when killed (ICS)

I'm developing an android app using bluetooth communication (using a propetary protocol) and I need to catch the moment when …

android android-4.0-ice-cream-sandwich ondestroy