Re: [android-developers] How does android decide to cache a process?

2011-08-05 Thread Mark Murphy
On Thu, Aug 4, 2011 at 9:32 PM, KK krishnakumar.ramachand...@gmail.com wrote:
 In Gingerbread Settings-Applications-MyApplications, the Running tab
 has been divided into two. Running Services and Cached Background
 Process. So how and when does Android decide to cache a process?

How: by not terminating the process.

When: always, until the device is low on RAM. The algorithm for
determining which processes to terminate first is based on the process
priority, as outlined here:

http://developer.android.com/guide/topics/fundamentals/processes-and-threads.html#Lifecycle

 Mainly is there anything my app can do to tell the system to never
 cache my process?

No. Moreover, you should not need this, as a well-written app neither
knows nor cares when its process comes and goes.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training in NYC: http://marakana.com/training/android/

-- 
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


Re: [android-developers] How does android decide to cache a process?

2011-08-05 Thread TreKing
On Thu, Aug 4, 2011 at 8:32 PM, KK krishnakumar.ramachand...@gmail.comwrote:

 Mainly is there anything my app can do to tell the system to never cache my
 process?


I'm curious why you would even want this ... ?

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
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