- Foreground processA process that is required for what the user is currently doing. A process is considered to be in the foreground if any of the following conditions are true:
- It hosts an
Activitythat the user is interacting with (theActivity'sonResume()method has been called). - It hosts a
Servicethat's bound to the activity that the user is interacting with. - It hosts a
Servicethat's running "in the foreground"—the service has calledstartForeground(). - It hosts a
Servicethat's executing one of its lifecycle callbacks (onCreate(),onStart(), oronDestroy()). - It hosts a
BroadcastReceiverthat's executing itsonReceive()method.
Generally, only a few foreground processes exist at any given time. They are killed only as a last resort—if memory is so low that they cannot all continue to run. Generally, at that point, the device has reached a memory paging state, so killing some foreground processes is required to keep the user interface responsive. - It hosts an
- Visible processA process that doesn't have any foreground components, but still can affect what the user sees on screen. A process is considered to be visible if either of the following conditions are true:
- It hosts an
Activitythat is not in the foreground, but is still visible to the user (itsonPause()method has been called). This might occur, for example, if the foreground activity started a dialog, which allows the previous activity to be seen behind it. - It hosts a
Servicethat's bound to a visible (or foreground) activity.
A visible process is considered extremely important and will not be killed unless doing so is required to keep all foreground processes running. - It hosts an
- Service processA process that is running a service that has been started with the
startService()method and does not fall into either of the two higher categories. Although service processes are not directly tied to anything the user sees, they are generally doing things that the user cares about (such as playing music in the background or downloading data on the network), so the system keeps them running unless there's not enough memory to retain them along with all foreground and visible processes. - Background processA process holding an activity that's not currently visible to the user (the activity's
onStop()method has been called). These processes have no direct impact on the user experience, and the system can kill them at any time to reclaim memory for a foreground, visible, or service process. Usually there are many background processes running, so they are kept in an LRU (least recently used) list to ensure that the process with the activity that was most recently seen by the user is the last to be killed. If an activity implements its lifecycle methods correctly, and saves its current state, killing its process will not have a visible effect on the user experience, because when the user navigates back to the activity, the activity restores all of its visible state. See the Activities document for information about saving and restoring state. - Empty processA process that doesn't hold any active application components. The only reason to keep this kind of process alive is for caching purposes, to improve startup time the next time a component needs to run in it. The system often kills these processes in order to balance overall system resources between process caches and the underlying kernel caches.
開這網站的目的是發現有很多人想了解電腦相關資訊,補習費用也不便宜,下了班很累想休息一下時間無法配合於是想分享我所學 未來會包含課程規劃會有: 程式語言上:Java、C#、PHP.. 手機設計:Android,、ObjectC 認證包含:SCJP、SCWCD、LPI1~LPI2.... 網頁設計:HTML5、JavaScript.... 陸陸續續會再增加! 以上課程都是我本人教學如有任何問題可在此留言我會答覆您的
HTML/JavaScript小工具
HTML/JavaScript小工具
2012年12月18日 星期二
Android Process 刪除順序
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言