You're looking at Less Wrong's discussion board. This includes all posts, including those that haven't been promoted to the front page yet. For more information, see About Less Wrong.

Baughn comments on Open thread, Nov. 3 - Nov. 9, 2014 - Less Wrong Discussion

4 Post author: MrMind 03 November 2014 09:55AM

You are viewing a comment permalink. View the original post to see all comments and the full post content.

Comments (310)

You are viewing a single comment's thread. Show more comments above.

Comment author: Baughn 06 November 2014 01:33:19AM *  2 points [-]

Swiping applications off the screen doesn't actually close them. It just removes them from the list.

The Android OS transparently closes applications based on memory pressure. You're never supposed to have to do it yourself, and it'll transparently reopen them to their previous state based on persistence files.

It usually works. Of course, sometimes apps get it wrong.

Comment author: ChristianKl 06 November 2014 02:20:33PM *  1 point [-]

It does seem to send a message to the app to which the App can listen with "onTaskRemoved()" and the default behavior is closing the App. If something really want to close an App the app can do it's cleanup under "onDestroy()". Because onDestroy doesn't get called directly it's up to the App to decide whether it wants to close.

My self written app with doesn't do anything specific to handle the case closes automatically based on what the console says.

Comment author: bogus 06 November 2014 03:19:40AM *  0 points [-]

Swiping applications off the screen doesn't actually close them. It just removes them from the list.

I think this is not actually true. The OS can close applications behind your back, but swiping an application off does remove it from memory, quite reliably. Things are done this way because Android devices have comparatively limited RAM and no swap space, so the system must proactively avoid memory pressure. This state of things might improve somewhat as recent Linux versions have added things like swap-to-compressed-memory and volatile memory that help save on RAM usage.