And I did dig into the sources. App is permanently killed, except for manifest registered events (unverified) and alarms. So any sticky device not relying on those is a dead service. In 4.4.x only that is.
I found a work around but its so dirty I wait for a better option if any before posting. Le 14 déc. 2013 17:37, "Kristopher Micinski" <[email protected]> a écrit : > Just as a note: you're being fairly condescending to people who are > suggesting solutions to you free of charge in a pretty polite way.. > > I personally don't know what the semantics of the swipe away are: but > I wouldn't be surprised if it were to kill the app. I am not sure > whether or not I'd call it a bug or not (I'd personally lean toward > not) but it's obvious you feel differently. If nobody else > (presumably, someone who's read the source..) responds to this you > could always dig through the system source to find out! > > Kris > > > On Fri, Dec 13, 2013 at 6:59 AM, 3c <[email protected]> wrote: > > Thanks but I'm fully aware of this and as the title suggest I'm > referring to > > swiping an app from the recent task list. Not sure how this has anything > to > > do with this. > > > > On Android 4.4, the recent task list is now acting like a force-stop and > > that's a definitive and obvious bug. And this behavior is anything but > what > > end-users do expect when removing apps from recent list. I've already > > received a dozen reports from end-users who think my app stops > functioning > > unexpectedly, while they only swiped it away from the recent list, they > > expect its services to continue running! > > > > How nice this is when an app actually has widgets on the launcher? Those > > simply stop refreshing forever! If that's not a bug, I guess Android OS > and > > my app both have 0 bug. I'll make sure to refer my users to your posts so > > they understand there's no bug! > > > > Have a read at these: > > > http://developer.android.com/reference/android/app/Service.html#onTaskRemoved(android.content.Intent) > > > http://developer.android.com/reference/android/content/pm/ServiceInfo.html#FLAG_STOP_WITH_TASK > > > > > > On Friday, December 13, 2013 4:25:42 AM UTC+1, RichardC wrote: > >> > >> Have a read of: > >> > >> Launch controls on stopped applications in > >> http://developer.android.com/about/versions/android-3.1.html > >> > >> Note that it says: > >> "Applications are in a stopped state when they are first installed but > are > >> not yet launched and when they are manually stopped by the user (in > Manage > >> Applications)." > >> > >> This was introduced in 3.1 before we had swiping away. > >> > >> > >> On Friday, December 13, 2013 1:22:27 AM UTC, 3c wrote: > >>> > >>> I cannot agree with this as the recent task list in no way suggest > >>> killing the apps. Actually every users seems to see it differently. > Some > >>> take that recent task list as the name suggest, recent tasks and > activities, > >>> others see it as you suggest an app killing, but most users don't know > >>> what's actually happening when removing a task from that list. > >>> > >>> Furthermore that list doesn't actually reflect apps still running, but > >>> the recent tasks or apps used by end-user. On boot I may have a dozen > apps > >>> running, but no way to kill them (except going into settings, > force-stop) if > >>> I haven't started them once, making this task killer the worse I've > ever > >>> seen: it requires end-user to open the app before being able to kill it > >>> permanently! And it's not because I remove a task from that very list > that I > >>> don't want its services to continue running. > >>> > >>> Looking at documentation for the Service class and the related manifest > >>> attributes definitely confirm the behavior of Android 4.0 to 4.3: > >>> > >>> With Android 4.4, the below flag is now ineffective, which falls into > the > >>> bug category, not the other way around as you suggest. > >>> > >>> > >>> public static final int stopWithTask > >>> Added in API level 14 > >>> > >>> If set to true, this service with be automatically stopped when the > user > >>> remove a task rooted in an activity owned by the application. The > default is > >>> false. > >>> > >>> Must be a boolean value, either "true" or "false". > >>> > >>> public void onTaskRemoved (Intent rootIntent) > >>> > >>> Added in API level 14 > >>> > >>> This is called if the service is currently running and the user has > >>> removed a task that comes from the service's application. If you have > set > >>> ServiceInfo.FLAG_STOP_WITH_TASK then you will not receive this > callback; > >>> instead, the service will simply be stopped. > >>> > >>> > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to [email protected] > > To unsubscribe from this group, send email to > > [email protected] > > 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 [email protected]. > > For more options, visit https://groups.google.com/groups/opt_out. > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > 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 a topic in the > Google Groups "Android Developers" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/android-developers/H-DSQ4-tiac/unsubscribe > . > To unsubscribe from this group and all its topics, send an email to > [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

