# 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.