I decided to dig further into this based on readings from Googling, and 
here are some stats from adb shell dumpsys activity:

Here's the last line I see an instant before the app is killed (I'm just 
running it over and over):

 Proc # 4: prcp  F/S/IF trm: 0 17361:com.mypackage.name/u0a241 (fg-service)


With this in LogCat:


 I/ActivityManager( 1743): Killing 17361:com.mypackage.name/u0a241 (adj 0): 
remove task


It doesn't always get killed, but it does get killed pretty often. If it 
doesn't get killed right away (within 5 seconds or so) then it seems to 
persist.

Here's what I see run another other app that doesn't get killed:

 Proc # 4: prcp F/S/IF trm: 0 17539:com.anotherpackage.name/u0a118 
(fg-service)

With dab shell dumpsys meminfo (IIRC), this other app was also consuming 
significantly more memory than my own, yet not getting killed. So, I'm not 
really seeing much difference and not understanding why my app is getting 
killed. :(

On Thursday, March 13, 2014 12:36:03 AM UTC-4, Digipom wrote:
>
> I'm running into an issue with my app on KitKat 4.4.2: when it's 
> recording, and the user later sends it to the background and swipes it away 
> from the recent apps list, the app is killed, even though it called 
> startForeground!
>
> This did not happen on 4.3, and to add insult to injury, the notification 
> doesn't disappear and the app services still appear in the "running 
> services" in the device settings.
>
> However, I see that this isn't happening for all apps. I downloaded some 
> other recorders, and I can confirm that their processes remain active in 
> memory even though I've also removed them from the recent apps list using 
> the same method; they remain active even if not recording! I thought it 
> could be an issue with the target API, but lowering that to 14 didn't help 
> (I don't think I could lower it further than that if using Action Bar 
> Sherlock).
>
> Does anyone have any ideas? It's definitely not cool from a customer's 
> point of view, so I really want to find a solution.
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to