# Screenshot

An action block that takes a screenshot, a capture of the current screen.

The fiber will proceed when a screenshot has been taken. Android 5 through 9 require user confirmation before the first screenshot, and for every screenshot on Android 10, use the Interact block with action Take screenshot as an alternative. This block will fail if the confirmation is denied/canceled.

On Android 10 the user confirmation requirement can be permanently disabled for Automate by using the ADB shell command or Shell command superuser to execute: `appops set com.llamalab.automate PROJECT_MEDIA allow`

An alternative to this block is to use the Shell command privileged, ADB shell command or Shell command superuser block to execute: `screencap <filename.png>`

Note! This feature isn’t officially supported until Android 5, requires the privileged service on lower versions, may not work on all devices.

## Input arguments

- Display id — id of the display to take screenshot of, see Display query block, default is id of the primary display. (Android 11+)
- Destination path — file or directory path where the image file will be saved, default is a PNG file in the “DCIM” directory.

## Output variables

- Image file — variable to assign the path to the PNG image file.