Lines Matching full:process
13 <li><a href="#Lifecycle">Process lifecycle</a></li>
29 running, the Android system starts a new Linux process for the application with a single thread of
30 execution. By default, all components of the same application run in the same process and thread
31 (called the "main" thread). If an application component starts and there already exists a process
33 started within that process and uses the same thread of execution. However, you can arrange for
35 threads for any process.</p>
42 <p>By default, all components of the same application run in the same process and most applications
43 should not change this. However, if you find that you need to control which process a certain
51 <provider>}</a>—supports an {@code android:process} attribute that can specify a
52 process in which that component should run. You can set this attribute so that each component runs
53 in its own process or so that some components share a process while others do not. You can also set
54 {@code android:process} so that components of different applications run in the same
55 process—provided that the applications share the same Linux user ID and are signed with the
59 <application>}</a> element also supports an {@code android:process} attribute, to set a
62 <p>Android might decide to shut down a process at some point, when memory is low and required by
64 components running in the process that's killed are consequently destroyed. A process is started
68 the user. For example, it more readily shuts down a process hosting activities that are no longer
69 visible on screen, compared to a process hosting visible activities. The decision whether to
70 terminate a process, therefore, depends on the state of the components running in that process. The
74 <h3 id="Lifecycle">Process lifecycle</h3>
76 <p>The Android system tries to maintain an application process for as long as possible, but
79 and which to kill, the system places each process into an "importance hierarchy" based on the
80 components running in the process and the state of those components. Processes with the lowest
85 types of processes in order of importance (the first process is <em>most important</em> and is
89 <li><b>Foreground process</b>
90 <p>A process that is required for what the user is currently doing. A
91 process is considered to be in the foreground if any of the following conditions are true:</p>
117 <li><b>Visible process</b>
118 <p>A process that doesn't have any foreground components, but still can
119 affect what the user sees on screen. A process is considered to be visible if either of the
132 <p>A visible process is considered extremely important and will not be killed unless doing so
136 <li><b>Service process</b>
137 <p>A process that is running a service that has been started with the {@link
145 <li><b>Background process</b>
146 <p>A process holding an activity that's not currently visible to the user (the activity's
150 visible, or service process. Usually there are many background processes running, so they are kept
151 in an LRU (least recently used) list to ensure that the process with the activity that was most
153 correctly, and saves its current state, killing its process will not have a visible effect on
160 <li><b>Empty process</b>
161 <p>A process that doesn't hold any active application components. The only reason to keep this
162 kind of process alive is for caching purposes, to improve startup time the next time a component
164 resources between process caches and the underlying kernel caches.</p>
169 <p>Android ranks a process at the highest level it can, based upon the importance of the
170 components currently active in the process. For example, if a process hosts a service and a visible
171 activity, the process is ranked as a visible process, not a service process.</p>
173 <p>In addition, a process's ranking might be increased because other processes are dependent on
174 it—a process that is serving another process can never be ranked lower than the process it is
175 serving. For example, if a content provider in process A is serving a client in process B, or if a
176 service in process A is bound to a component in process B, process A is always considered at least
177 as important as process B.</p>
179 <p>Because a process running a service is ranked higher than a process with background activities,
185 Using a service guarantees that the operation will have at least "service process" priority,
202 components that run in the same process are instantiated in the UI thread, and system calls to
205 or a lifecycle callback method) always run in the UI thread of the process.</p>
294 using a {@link android.os.Handler} in your worker thread, to process messages delivered from the UI
374 method implemented in an {@link android.os.IBinder} originates in the same process in which the
376 However, when the call originates in another process, the method is executed in a thread chosen from
377 a pool of threads that the system maintains in the same process as the {@link android.os.IBinder
378 IBinder} (it's not executed in the UI thread of the process). For example, whereas a service's
380 service's process, methods implemented in the object that {@link android.app.Service#onBind
393 getType()}—are called from a pool of threads in the content provider's process, not the UI
394 thread for the process. Because these methods might be called from any number of threads at the
402 remotely (in another process), with any result returned back to the
404 understand, transmitting it from the local process and address space to the remote process and