Added in API level 30

TakeScreenshotCallback


interface TakeScreenshotCallback
android.accessibilityservice.AccessibilityService.TakeScreenshotCallback

Interface used to report status of taking screenshot.

Summary

Public methods
abstract Unit
onFailure(errorCode: Int)

Called when taking screenshot has failed.

abstract Unit

Called when taking screenshot has completed successfully.

Public methods

onSuccess

Added in API level 30
abstract fun onSuccess(screenshot: AccessibilityService.ScreenshotResult): Unit

Called when taking screenshot has completed successfully.

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