Android: Inconsistency In Documentation. When May An App Be Killed?
Solution 1:
Article ** says that the app is only killable in certain parts of its life cycle.
Apps don't have a lifecycle. The table in question is about the activity lifecycle. Processes also have a "lifecycle" -- covered in your second link -- though personally I would not have chosen that noun.
Which is right?
In general, both, though I think that the second link is slightly out of date. There are more process importance states, and I do not think that "foreground" services are treated the same as "foreground" UI anymore. AFAIK, a "foreground" service moves the process to IMPORTANCE_PERCEPTIBLE
, which is lower priority than IMPORTANCE_FOREGROUND
. And, as a result (and AFAIK), a process that has a "foreground" service but does not have an activity in the foreground is more likely to be terminated due to low memory conditions than is a process that has an activity in the foreground.
Post a Comment for "Android: Inconsistency In Documentation. When May An App Be Killed?"