okay, what else can you do in an OOM condition *that makes sense to do*, in pretty much any case?
-
-
YouTube even loses your scroll position in a huge list if you switch apps, without any kill. Nothing reliably keeps data across getting killed.
-
Activities are killed and spawned again simply by rotating your screen.
-
You don't really know if an app is being killed when it's in the background. That's probably what's happening to YouTube for you. It still being in the least of recent apps doesn't mean it wasn't killed.
-
So sure, some apps are buggy. If the YouTube app is wrapping web content, the reason would probably be that it's a lot harder to do this for content in a WebView vs. native content with proper support for it. Browsers make it hard to restore scroll position, etc.
-
Using transactions for actual data is easy, as is saving content the user was working on. It's definitely harder to restore the *view* to exactly how it was after dealing with an activity respawn but that's not lost data, it's an inconvenience.
-
Transactions are great but hard to use for editing a giant image or other tasks with high data volume.
-
They do it though, because they literally get killed when you rotate the screen, change locale, etc. so they don't have much choice. On Android, the app being told to save state and then being killed at any time isn't exceptional but rather the regular way things happen.
-
The way they handle killing apps in the background is literally the same process that happens when you simply rotate the screen. It asks the active activity to save a bundle (i.e. state of the view, unsaved data) and then passes it to the activity again when it's restored.
- 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.