Live data from Hacker News

Don't kill my app

dontkillmyapp.com

51–60 of 84 posts

Re: Don't kill my app

#51
It's weird how this can be an issue in both directions.

There are times when I don't want the OS to kill an app, and the OS can often fail in this aspect, causing loss of control.

However even more frustratingly, I've increasingly noticed that apps I only need rarely, maybe once a day, once a month, once a year, will still run in the background even with setting the app's battery settings in the OS to restricted.

There is _nothing_ I can do to stop them from running, except uninstall them, but that's a pain for apps I have no choice but to use, even if rarely.

This is a problem even on GrapheneOS which increases user control. You could temporarily disable apps, but it is such a tedious process that uninstalling might be easier.

Re: Don't kill my app

#52
post #17

I think many commenters supporting the "kill my app" behavior do not understand how bad using the affected devices can be. The reason I first discovered "don't kill my app" is that my apps would close as soon as I switched to another one, in most cases. For example if I used maps and switched to a call / browser tab / Telegram chat, when I got back to the map the app would reload. My search would be gone, and I would…

That's indeed a terrible user experience, and the fact that the alternative isn't used (apps saving state even in trivial cases like which paragraph you're reading or a search query) adds to it. Wasting battery seems easier, so I'd also prefer to be able to configure to allow it rather than have all the apps killed and lose state, after all, it's my battery to waste

Re: Don't kill my app

#53
post #17

I think many commenters supporting the "kill my app" behavior do not understand how bad using the affected devices can be. The reason I first discovered "don't kill my app" is that my apps would close as soon as I switched to another one, in most cases. For example if I used maps and switched to a call / browser tab / Telegram chat, when I got back to the map the app would reload. My search would be gone, and I would…

I despise that this still happens today on a phone with 8GB of RAM. EIGHT GIGABYTES. That's what they sell the MacBook Pro with, but Android, built for low memory devices from the ground up, can't consistently keep a single application in memory in the background for just a few seconds. You can literally switch for five seconds and the last app has to reload. This drives me absolutely nuts.

8 GB of memory on a laptop is pathetic in 2023 and everybody knows it. And you're either using a very broken Android OS implementation or very unusual apps, it should not behave that way.

Re: Don't kill my app

#54
How old is this? Under "other vendors" they are on about Android 6, 7 and 8.

On Google Pixels, apps get aggressively killed in extreme battery saver mode. To spare an app from this, designate it as an essential app. No brainer.

Re: Don't kill my app

#55
post #18

Earlier quoted context omitted.

Many app need to keep state while they are in background though. Imagine your browswer tabs reloading every time you swotch to a different app and back.

Doesn’t mean your apps need to run in the background all the time. State restoration is a concept that has been present in Android/iOS from the beginning (or almost) and many apps implement it successfully. This is not why the “Don’t kill my app” author wants to run in the background. Also Android has ongoing notifications which let your app stay running forever and iOS introduced Live Activities in iOS 16 which can…

Yeah, but I was talking as a user. The worst case of this for me was with Google Maps, you'd think Google would know how to write apps for their OS.

Re: Don't kill my app

#56
post #29
post #14

Earlier quoted context omitted.

Can't you close your apps when you don't want them to stay open? The reason I first discovered "don't kill my app" is that my apps would close as soon as I switched to another one, in most cases. For example if I used maps and switched to a call / browser tab / Telegram chat, when I got back to the map my search would be gone. So no please, don't kill my app when I don't want you to.

Not sure what you meant by that - mobile apps don't have main() or exit(), they are driven by onThingsHappen(Event event) calls. When the OS decides to call `onYourAppIsResumedFromAltTab(context SwappedOutMemoryContent)` instead of `onYourAppWasJustLaunched(void)`, your app can resume functioning. The former is more likely to happen on devices with larger RAM space. You as an app developer don't have full control ove…

As a user, I can swipe up and hold from my home screen (depends on your launcher probably) and "swipe away" the apps I want to actually close, as in remove from the background. Not all of them comply, though.

Re: Don't kill my app

#57
post #17

I think many commenters supporting the "kill my app" behavior do not understand how bad using the affected devices can be. The reason I first discovered "don't kill my app" is that my apps would close as soon as I switched to another one, in most cases. For example if I used maps and switched to a call / browser tab / Telegram chat, when I got back to the map the app would reload. My search would be gone, and I would…

I despise that this still happens today on a phone with 8GB of RAM. EIGHT GIGABYTES. That's what they sell the MacBook Pro with, but Android, built for low memory devices from the ground up, can't consistently keep a single application in memory in the background for just a few seconds. You can literally switch for five seconds and the last app has to reload. This drives me absolutely nuts.

Yeah. It's supposed to be like 8 thousand UNIX computers. It just has to be insanely enormous bloat.

Hence my personal belief: GUI operating systems must evolve to slow down to match user-expected frequency of stimuli. Too fast and users leave, so they add crufts and weights until it's slow enough.

Re: Don't kill my app

#58
post #31

Earlier quoted context omitted.

I'm a happy user of DAVx5 and my employer just recently issued one of the more aggressive killing phones. I followed the steps suggested in the setup and it works just fine now. I'd much rather have a complicated opt-in to background activity than any form of opt-out.

It’s still opt-in in vanilla. But it’s a simple toggle.

That I did not know! It was a while since I used an AOSP-close ROM.

Re: Don't kill my app

#59
post #17

I think many commenters supporting the "kill my app" behavior do not understand how bad using the affected devices can be. The reason I first discovered "don't kill my app" is that my apps would close as soon as I switched to another one, in most cases. For example if I used maps and switched to a call / browser tab / Telegram chat, when I got back to the map the app would reload. My search would be gone, and I would…

Why can't the app save its state to storage and restore the saved state when it's started again?

Because developers don't keep track of possible state changes that follows a callback? Mobile apps are not like C code with an entrypoint, you can't like dump all virtual memory to disk and write back to resume. It's all callbacks and object instantiations, and listing all objects is already a best-effort task.

It won't be impossible to architect an app so that there would be an instance of a class that store all relevant states and load on creation, of course, and I'm guessing that level of competence is mid-six-figure quality in app world.

Re: Don't kill my app

#60
post #20

Earlier quoted context omitted.

This somehow seems to have become an inevitable reality of mobile phones. I had to upgrade from my iPhone 7 because it had essentially become a “single-process OS” where even switching to Google Translate to help me compose a message would have the messaging app killed in the background. And now I am experiencing similar issues, although not as severely yet, with my iPhone 12 Pro Max. Restarting the phone seems to he…

Never experienced anything remotely similar as you described with either my iPhone X when I had that, or my current iPhone 12 Pro..

Even my iPhone 6S doesn't exhibit this behavior.
Post reply on HN