Process lifecycle:-
in android needs to remove old process when there is low memory.So decision is made on the state of the activity. There are four states. As mentioned below with highest importance at top
i.Foreground activity considered as the most important.
ii.visible activity:-is considered extremely important and will not be killed unless that is required to keep the foreground activity running.
iii.background activity:- is no longer critical, so the system may safely kill its process to reclaim memory for other foreground or visible processes.
iv. empty process:- is one hosting no activities or other application components (such as Service or BroadcastReceiver classes).These are killed very quickly by the system as memory becomes low. For this reason, any background operation you do outside of an activity must be executed in the context of an activity
No comments:
Post a Comment