# Print output for @column tags ?> AccessibilityService.TakeScreenshotCallback - Android SDK | Android Developers

Most visited


Recently visited


AccessibilityService.TakeScreenshotCallback

public static interface AccessibilityService.TakeScreenshotCallback

android.accessibilityservice.AccessibilityService.TakeScreenshotCallback


Interface used to report status of taking screenshot.

Summary


Public methods

abstract void onFailure(int errorCode)

Called when taking screenshot has failed.

abstract void onSuccess(AccessibilityService.ScreenshotResult screenshot)

Called when taking screenshot has completed successfully.

Public methods


onFailure

public abstract void onFailure (int errorCode)

Called when taking screenshot has failed. errorCode will identify the reason of failure.

Parameters
errorCode int: The error code of this operation. Value is AccessibilityService.ERROR_TAKE_SCREENSHOT_INTERNAL_ERROR, AccessibilityService.ERROR_TAKE_SCREENSHOT_NO_ACCESSIBILITY_ACCESS, AccessibilityService.ERROR_TAKE_SCREENSHOT_INTERVAL_TIME_SHORT, or AccessibilityService.ERROR_TAKE_SCREENSHOT_INVALID_DISPLAY

onSuccess

public abstract void onSuccess (AccessibilityService.ScreenshotResult screenshot)

Called when taking screenshot has completed successfully.

Parameters
screenshot AccessibilityService.ScreenshotResult: The content of screenshot. This value cannot be null.

Browse this site in English?

You requested a page in English, but your language preference for this site is English.

Would you like to change your language preference and browse this site in English? If you want to change your language preference later, use the language menu at the bottom of each page.