Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Methods](https://developer.android.com/reference/android/accessibilityservice/AccessibilityService.ScreenshotResult#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/accessibilityservice/AccessibilityService.ScreenshotResult#inhmethods)

# AccessibilityService.ScreenshotResult

*** ** * ** ***

` public static final class AccessibilityService.ScreenshotResult `   
` extends https://developer.android.com/reference/java/lang/Object ` ` `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.accessibilityservice.AccessibilityService.ScreenshotResult |

<br />

*** ** * ** ***

Can be used to construct a bitmap of the screenshot or any other operations for `https://developer.android.com/reference/android/accessibilityservice/AccessibilityService#takeScreenshot(int,%20java.util.concurrent.Executor,%20android.accessibilityservice.AccessibilityService.TakeScreenshotCallback)` API.

## Summary

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/android/graphics/ColorSpace` | ` https://developer.android.com/reference/android/accessibilityservice/AccessibilityService.ScreenshotResult#getColorSpace()() ` Gets the `https://developer.android.com/reference/android/graphics/ColorSpace` identifying a specific organization of colors of the screenshot. |
| ` https://developer.android.com/reference/android/hardware/HardwareBuffer` | ` https://developer.android.com/reference/android/accessibilityservice/AccessibilityService.ScreenshotResult#getHardwareBuffer()() ` Gets the `https://developer.android.com/reference/android/hardware/HardwareBuffer` representing a memory buffer of the screenshot. |
| ` long` | ` https://developer.android.com/reference/android/accessibilityservice/AccessibilityService.ScreenshotResult#getTimestamp()() ` Gets the timestamp of taking the screenshot. |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.

## Public methods

### getColorSpace

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ColorSpace getColorSpace ()
```

Gets the `https://developer.android.com/reference/android/graphics/ColorSpace` identifying a specific organization of colors of the screenshot.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/graphics/ColorSpace` | the color space. This value cannot be `null`. <br /> |

### getHardwareBuffer

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public HardwareBuffer getHardwareBuffer ()
```

Gets the `https://developer.android.com/reference/android/hardware/HardwareBuffer` representing a memory buffer of the screenshot.

**Note:** The application should call `https://developer.android.com/reference/android/hardware/HardwareBuffer#close()` when the buffer is no longer needed to free the underlying resources.

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/hardware/HardwareBuffer` | the hardware buffer. This value cannot be `null`. <br /> |

### getTimestamp

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public long getTimestamp ()
```

Gets the timestamp of taking the screenshot.

<br />

| Returns ||
|---|---|
| `long` | milliseconds of non-sleep uptime before screenshot since boot and it's from `https://developer.android.com/reference/android/os/SystemClock#uptimeMillis()` <br /> |