indrora / Atomic

Atomic: an IRC client from the ashes of yaaic
https://indrora.github.io/Atomic/
GNU General Public License v3.0
123 stars 29 forks source link

[feature request] Option to keep alive the irc background process #31

Closed rodneyrod closed 10 years ago

rodneyrod commented 10 years ago

It'd be good if this was added to prevent auto closure due to low memory.

indrora commented 10 years ago

Already done to the best of my knowledge, however Android will kill background processes if it feels it can. I have very little control over it.

rodneyrod commented 10 years ago

I remember that LaucherPro had an option to force the background process to always remain open, I'm not sure if the Android API offers that option any more but it would be a nice feature if it is.

EDIT: Are you currently using startForeground() to try and keep the process alive? There's also this, public static final int BIND_ABOVE_CLIENT -- Added in API level 14

Flag for bindService(Intent, ServiceConnection, int): indicates that the client application binding to this service considers the service to be more important than the app itself. When set, the platform will try to have the out of memory killer kill the app before it kills the service it is bound to, though this is not guaranteed to be the case.

indrora commented 10 years ago

I'll look into this. Currently, I do set the sticky flags however I don't set BIND_ABOVE_CLIENT (which I could).