Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The Android application use intents to invoke System level resources. For example -- most of the software to run the camera is provided by the OS. Android OS is based off of the unix/linux kernel so using the camera would look like this.</p> <ol> <li>An Application/Process decides it wants to use the camera. </li> <li>That Application/Process builds an intent and passes it to the OS. </li> <li>The intent is processed by the OS, and the camera software is executed (exec) in a new process. The calling process can either block it if it called the intent synchronously, or it can run asynchronously and both the calling application and the intent invoked application can run at the same time. In the example of a camera, it will likely be called synchronously and block. </li> <li>The camera Process is used by the user to take a picture.</li> <li>The Camera process exits and produces either an error or a picture.</li> <li>The OS performs some ipc (inter process communication) to pass the picture back to the calling process. The choice to uses pipes or message passing is left to the OS, based on the kind of intent called by the application. A camera will probably use message passing since the parent process is blocked while the child process is running. </li> <li>Now the calling process, which was blocking waiting on the intent to return is awakened by the OS and returned to a running state.</li> <li>The Picture has been returned to the calling application, for it to use as it wishes. </li> </ol> <p>When you take a screen shot, this is exactly what happens. There is a process running to handle the user interface. It basically sits and waits for input and filters for anything that should be interpreted by the OS before it is piped to the current running application. This is another unix convention that at this point is standard in every OS I can think of -- piped input streams. It allows the OS to capture higher priority input, such as OS control commands before they are passed to applications. (think ctrl-alt-delete in windows, or ctrl-c/ctrl-z in unix.) When the screen shot keys are pressed, this upstream io process execs a special program to take a screen shot (via intent) and the command is never actually passed to the 'running' application. That program is executed (exec) in a new process, builds a bitmap of the screen, saves it to the gallery space, and dies -- all asynchronously with the scheduler handling time sharing so the phone feels 'responsive' the whole time. You see in John Bokers answer the source code with all the gorp to implement this. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload