Partager via


AccessibilityService.TakeScreenshot Method

Definition

Takes a screenshot of the specified display and returns it via an AccessibilityService.ScreenshotResult.

[Android.Runtime.Register("takeScreenshot", "(ILjava/util/concurrent/Executor;Landroid/accessibilityservice/AccessibilityService$TakeScreenshotCallback;)V", "GetTakeScreenshot_ILjava_util_concurrent_Executor_Landroid_accessibilityservice_AccessibilityService_TakeScreenshotCallback_Handler", ApiSince=30)]
public virtual void TakeScreenshot (int displayId, Java.Util.Concurrent.IExecutor executor, Android.AccessibilityServices.AccessibilityService.ITakeScreenshotCallback callback);
[<Android.Runtime.Register("takeScreenshot", "(ILjava/util/concurrent/Executor;Landroid/accessibilityservice/AccessibilityService$TakeScreenshotCallback;)V", "GetTakeScreenshot_ILjava_util_concurrent_Executor_Landroid_accessibilityservice_AccessibilityService_TakeScreenshotCallback_Handler", ApiSince=30)>]
abstract member TakeScreenshot : int * Java.Util.Concurrent.IExecutor * Android.AccessibilityServices.AccessibilityService.ITakeScreenshotCallback -> unit
override this.TakeScreenshot : int * Java.Util.Concurrent.IExecutor * Android.AccessibilityServices.AccessibilityService.ITakeScreenshotCallback -> unit

Parameters

displayId
Int32

The logic display id, must be Display#DEFAULT_DISPLAY for default display.

executor
IExecutor

Executor on which to run the callback.

callback
AccessibilityService.ITakeScreenshotCallback

The callback invoked when taking screenshot has succeeded or failed. See TakeScreenshotCallback for details.

Attributes

Remarks

Java documentation for android.accessibilityservice.AccessibilityService.takeScreenshot(int, java.util.concurrent.Executor, android.accessibilityservice.TakeScreenshotCallback).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to