Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>This is what my experience, and that of devs I've asked, seems to suggest:<br></p> <ol> <li> <ul> <li>Fragments are not autodestroyed.<br></li> <li>non-visible Activities on the app's stack can be autodestroyed in any order, and in any number.<br></li> <li>destroyed Activity's (or any other class's) Threads and statics remain untouched until Application is destroyed.<br></li> <li>TimerTasks: haven't tested.<br></li> <li>bound local Services: destroyed somewhere between the destruction of the last binding Activity and of Application.<br></li> <li>Application is the last thing to go within a process, and "goes" along with all Threads.<br></li> <li>the process can exist for a long (20+ minutes) time after the destruction of the Application object, unless you have an automatic task killer.<br></li> <li>Activities under TabActivity or in ActivityGroups are not autodestroyed, but go all at once if the container is destroyed.<br> Example: a TabActivity with ActivityGroups under tabs. All Activities live. Another Activity is started, fullscreen. The TabActivity with everything in it is now eligible for destruction by Android, all at once or not at all.</li> </ul></li> <li><em>NO</em>.<br> If you destroy an Activity manually, it goes through the entire lifecycle and doesn't pass a Bundle to onCreate when started again.<br> Also, onLowmemory is unreliable - even with small allocation steps, it might never be called before OutOfMemoryError is thrown.</li> <li><em>NO</em>.<br> Despite the autodestruction/restoration being such a major feature in Android, there isn't any way to test such scenarios.</li> <li>This is probably related <em>only</em> to whether the process still exists or not. If it does, Android will attempt to restore the old Activities. If not, it's a clean restart.</li> </ol> <p>The above include some assumptions.<br> I am still waiting for someone to confirm it and supply some docs (guarantees not dependent on the current implementation of classes).<br> Please, PLEASE correct me if any of this is wrong.<br> <br> Edit: The above information may be out of date, it was tested on Android 2.1-2.3<br></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload