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 |
Called when taking screenshot has failed. |
| abstract Unit |
onSuccess(screenshot: AccessibilityService.ScreenshotResult)Called when taking screenshot has completed successfully. |
Public methods
onFailure
Added in API level 30
abstract fun onFailure(errorCode: Int): Unit
Called when taking screenshot has failed. errorCode will identify the reason of failure.
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. |