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

# MultiResolutionImageReader.OnActiveOutputSurfacesListener

*** ** * ** ***


`
public
static


interface
MultiResolutionImageReader.OnActiveOutputSurfacesListener
`


`


`

|---|
| android.hardware.camera2.MultiResolutionImageReader.OnActiveOutputSurfacesListener |

<br />

*** ** * ** ***

Callback interface for being notified of the surfaces used for the capture.

The onActiveOutputSurfaces is called per request on this MultiResolutionImageReader,
to indicate which underlying ImageReader surfaces are outputting images.

<br />

## Summary

| ### Public methods ||
|---|---|
| ` abstract void` | ` https://developer.android.com/reference/android/hardware/camera2/MultiResolutionImageReader.OnActiveOutputSurfacesListener#onActiveOutputSurfaces(java.util.List<android.view.Surface>,%20long,%20long)(https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/view/Surface> activeOutputSurfaces, long timestamp, long frameNumber) ` Callback that is called to notify the active surfaces that the application should expect to receive images from. |

## Public methods

### onActiveOutputSurfaces

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

```
public abstract void onActiveOutputSurfaces (List<Surface> activeOutputSurfaces, 
                long timestamp, 
                long frameNumber)
```

Callback that is called to notify the active surfaces that the application should
expect to receive images from.

If the MultiResolutionImageReader is created with `enableConcurrency`
set to `true`, multiple underlying readers may produce images for a single
capture request. The application can listen to this callback to know which readers
to expect an output image from.

If the MultiResolutionImageReader is created without `enableConcurrency`
set to `true`, this callback will not the triggered.

For each of the `activeOutputSurfaces`, a
`https://developer.android.com/` will be called. Or in
rare cases, `https://developer.android.com/` is called if the buffer
is dropped.

The `timestamp` can be used to correlate between the
`activeOutputSurfaces` and the images being output from those surfaces. The
timestamp can be start of exposure or start of readout depending on whether
`https://developer.android.com/reference/android/hardware/camera2/params/OutputConfiguration#setReadoutTimestampEnabled(boolean)`
was called on the outputs. Similarly, the timestamp can be either in the same time base
as in `https://developer.android.com/reference/android/os/SystemClock#uptimeMillis()` or
`https://developer.android.com/reference/android/os/SystemClock#elapsedRealtime()` depending on the timestamp base of the
outputs. See `https://developer.android.com/reference/android/hardware/camera2/params/OutputConfiguration#setTimestampBase(int)` for details.

<br />

<br />

| Parameters ||
|---|---|
| `activeOutputSurfaces` | `List`: the active output surfaces to expect an output from. This value cannot be `null`. <br /> |
| `timestamp` | `long`: the timestamp of the capture. <br /> |
| `frameNumber` | `long`: the frame number of this capture. <br /> |

**See also:**

- `https://developer.android.com/reference/android/media/ImageReader`
- `https://developer.android.com/reference/android/hardware/camera2/CameraCaptureSession`
- `https://developer.android.com/reference/android/hardware/camera2/params/OutputConfiguration`