Android killing my app prematurely
<p>I've got a problem which has been driving me insane. I have an app which automatically adjusts system brightness on behalf of the user. It runs in the background to do its thing.</p>

<p>The issue is that Android keeps killing it, which is simply not acceptable for a system utility. The main service has been set as a foreground service, so it should remain alive, but the app still gets killed (even when plenty of memory is free in some cases).</p>

<p>My dilemma is, how can I keep my app alive as long as possible? I have a large customer base, and a decent portion (typically Android 4.1 users) are complaining that the app gets killed very quickly.</p>

<p>Any advice?</p>
