One possible reason is that a service that returns START_STICKY from its onStartCommand will cause the app's process to be re-created (usually after a five second delay, but I've seen larger delays too).
Such services are considered to be a big no-no. There are two interesting things here: 1 - The default, framework's, implementation on Service#onStartCommand is to return START_STICKY. This means that unless a developer is conscious of his service's lifetime requirements, the framework will default to "run forever, respawn the process, burn the battery". 2 - The number of processes in your list with "com.google.*" in their package names. If those guys don't want to play by the rules, why should anyone? -- K 2012/8/5 Yee Keat Phuah <[email protected]> > I have gathered more statistics from adb logcat -b events, piping into a > perl script that I have wrote, from a 5 minutes game of Dead Trigger: > +------------------------------------------------------------+-----+-----+ > |name |died |start| > +------------------------------------------------------------+-----+-----+ > |com.facebook.katana | 9| 9| > |com.kebab.Llama | 8| 7| > |android.process.media | 7| 7| > |ownhere.google.android.apps.maps:LocationFriendService | 7| 7| > |ownhere.google.android.apps.maps:FriendService | 6| 6| > |ownhere.google.android.apps.maps:NetworkLocationService | 6| 6| > |com.facebook.orca | 5| 4| > |android.process.acore | 5| 5| > |com.google.android.talk | 5| 6| > |com.google.android.gsf.login | 4| 4| > |com.google.process.gapps | 4| 4| > |com.google.android.apps.uploader | 3| 3| > |com.google.android.gallery3d | 3| 3| > |com.google.android.apps.plus | 3| 3| > |com.google.android.youtube | 2| 2| > |com.android.vending | 2| 2| > |com.london2012.results | 2| 3| > |ownhere.google.android.apps.maps | 2| 1| > |com.asksven.betterbatterystats_xdaedition | 2| 1| > |com.skype.raider | 2| 1| > |com.android.settings | 2| 2| > |net.dinglisch.android.taskerm | 1| 1| > |com.google.android.deskclock | 1| 1| > |com.google.android.apps.docs | 1| 2| > |com.android.launcher | 1| 1| > |com.google.android.googlequicksearchbox | 1| 0| > |com.madfingergames.deadtrigger:com.urbanairship.push.process| 1| 1| > |com.madfingergames.deadtrigger | 1| 1| > +------------------------------------------------------------+-----+-----+ > |Total | 96| 93| > +------------------------------------------------------------+-----+-----+ > Earliest = 08-04 22:00:22.414, Latest = 08-04 22:05:56.867 > > From a 15 minutes of Dead Trigger game: > +------------------------------------------------------------+-----+-----+ > |name |died |start| > +------------------------------------------------------------+-----+-----+ > |com.google.process.gapps | 33| 33| > |ownhere.google.android.apps.maps:LocationFriendService | 22| 22| > |com.google.android.gsf.login | 19| 19| > |com.google.android.talk | 18| 17| > |android.process.acore | 17| 17| > |ownhere.google.android.apps.maps:FriendService | 16| 16| > |ownhere.google.android.apps.maps:NetworkLocationService | 16| 16| > |com.facebook.katana | 15| 15| > |com.kebab.Llama | 14| 14| > |android.process.media | 11| 11| > |com.google.android.gm | 3| 2| > |net.dinglisch.android.taskerm | 2| 1| > |com.google.android.calendar | 2| 3| > |ownhere.google.android.apps.maps | 2| 1| > |com.android.providers.calendar | 2| 2| > |com.google.android.googlequicksearchbox | 2| 2| > |com.google.android.youtube | 1| 0| > |com.google.android.apps.uploader | 1| 0| > |com.google.android.deskclock | 1| 2| > |com.android.vending | 1| 2| > |com.lim.android.automemman | 1| 0| > |com.android.launcher | 1| 1| > |com.madfingergames.deadtrigger:com.urbanairship.push.process| 1| 1| > |com.google.android.gallery3d | 1| 0| > |com.dg.gtd.android.lite | 1| 1| > |com.google.android.inputmethod.latin.dictionarypack | 1| 1| > |com.asksven.betterbatterystats_xdaedition | 1| 0| > |com.google.android.apps.plus | 1| 0| > |com.madfingergames.deadtrigger | 1| 1| > |com.google.android.inputmethod.latin | 1| 1| > |com.google.android.partnersetup | 1| 2| > +------------------------------------------------------------+-----+-----+ > |Total | 209| 203| > +------------------------------------------------------------+-----+-----+ > Earliest = 08-05 18:38:07.382, Latest = 08-05 18:52:54.068 > > Its amazing that apps are killed and restarted so many times just over the > time period of 15 minutes! Is this by design? I remember reading the famous > myth debunk about Android not needing a task killer. But if this is what > android does by default, killing and restarting blindly, then I think > Android do need a task killer. Having to go into "Manage Apps" to find each > app manually in the "All" list (since I can't force stop in the Running > list) and Force Stop each of them is just too troublesome for me to do > everytime I want to play a game! > > -- > 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 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

