# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Ctors | Methods | Inherited Methods

# CameraExtensionSession.StateCallback

`public static abstract class CameraExtensionSession.StateCallback`
`extends Object` ``

java.lang.Object
↳ | android.hardware.camera2.CameraExtensionSession.StateCallback

A callback object for receiving updates about the state of a camera extension session.

## Summary

### Public constructors
`StateCallback()`

### Public methods
`void` | `onClosed(CameraExtensionSession session)` This method is called when the session is closed.
`abstract void` | `onConfigureFailed(CameraExtensionSession session)` This method is called if the session cannot be configured as requested.
`abstract void` | `onConfigured(CameraExtensionSession session)` This method is called when the camera device has finished configuring itself, and the session can start processing capture requests.

### Inherited methods
From class `java.lang.Object`
`Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
`int` | `hashCode()` Returns a hash code value for the object.
`final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
`final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
`String` | `toString()` Returns a string representation of the object.
`final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.

## Public constructors

### StateCallback

    public StateCallback ()

## Public methods

### onClosed

    public void onClosed (CameraExtensionSession session)

This method is called when the session is closed.

A session is closed when a new session is created by the parent camera device, or when the parent camera device is closed (either by the user closing the device, or due to a camera device disconnection or fatal error).

Once a session is closed, all methods on it will throw an IllegalStateException, and any repeating requests are stopped (as if `CameraExtensionSession.stopRepeating()` was called). However, any in-progress capture requests submitted to the session will be completed as normal.

Parameters
`session` | `CameraExtensionSession`: the session received during `StateCallback#onConfigured(CameraExtensionSession)` This value cannot be `null`.

### onConfigureFailed

    public abstract void onConfigureFailed (CameraExtensionSession session)

This method is called if the session cannot be configured as requested.

This can happen if the set of requested outputs contains unsupported sizes, too many outputs are requested at once or when trying to initialize multiple concurrent extension sessions from two (or more) separate camera devices or the camera device encounters an unrecoverable error during configuration.

The session is considered to be closed, and all methods called on it after this callback is invoked will throw an IllegalStateException.

Parameters
`session` | `CameraExtensionSession`: the session instance that failed to configure This value cannot be `null`.

### onConfigured

    public abstract void onConfigured (CameraExtensionSession session)

This method is called when the camera device has finished configuring itself, and the session can start processing capture requests.

If the camera device configuration fails, then `onConfigureFailed(CameraExtensionSession)` will be invoked instead of this callback.

Parameters
`session` | `CameraExtensionSession`: A valid extension session This value cannot be `null`.

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*