←back to thread

475 points snthd | 2 comments | | HN request time: 0s | source
Show context
mbeex ◴[] No.45654873[source]
The one thing I dislike, is the trouble to finish the application in a sane way:

https://bugs.kde.org/show_bug.cgi?id=423497

replies(2): >>45654950 #>>45655651 #
goda90 ◴[] No.45654950[source]
I can't say I'm experienced with Android development, but is there something about this issue that makes it hard for a volunteer to submit a PR? Seems like it should be just an OS API call or something.
replies(1): >>45655871 #
immibis ◴[] No.45655871[source]
Android doesn't really have such a thing as quitting an app. You're meant to just stop doing stuff when off screen, and let your app be evicted in LRU order (or whatever order is actually used). If your app does background stuff you should have a settings toggle to do the background stuff or not, and when it's on and the phone is on, you do the background stuff.
replies(1): >>45657150 #
1. ranger_danger ◴[] No.45657150[source]
This is not true: https://stackoverflow.com/a/40231289
replies(1): >>45658390 #
2. immibis ◴[] No.45658390[source]
This closes an activity - the user interface of an app - not an app. In Windows terms, this is DestroyWindow, not ExitProcess.

You can also exit an Android process, of course. It's probably what you're looking for, but it's weirdly inconsistent with the overall user experience and you should try to make something consistent instead. Even closing a top-level activity is weird.