# ChooserSession.StateListener

Added in[version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)  

# ChooserSession.StateListener

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/service/chooser/ChooserSession.StateListener "View this page in Kotlin")\|Java

`
public
static


interface
ChooserSession.StateListener
`  
`


`

|------------------------------------------------------|
| android.service.chooser.ChooserSession.StateListener |

<br />

*** ** * ** ***

A callback interface for Chooser session state updates.

## Summary

|                                                                                                                                                ### Public methods                                                                                                                                                ||
|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract void` | ` `[onBoundsChanged](https://developer.android.com/reference/android/service/chooser/ChooserSession.StateListener#onBoundsChanged(android.graphics.Rect))`(`[Rect](https://developer.android.com/reference/android/graphics/Rect)` bounds) ` Gets invoked when the Chooser bounds are changed. |
| ` abstract void` | ` `[onStateChanged](https://developer.android.com/reference/android/service/chooser/ChooserSession.StateListener#onStateChanged(int))`(int state) ` Gets invoked when ChooserManager lifecycle state has changed.                                                                              |

## Public methods

### onBoundsChanged

Added in[version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)  

```
public abstract void onBoundsChanged (Rect bounds)
```

Gets invoked when the Chooser bounds are changed. The rect parameter represents Chooser window bounds in pixels.

<br />

|                      Parameters                      ||
|----------|--------------------------------------------|
| `bounds` | `Rect`: This value cannot be`null`. <br /> |

### onStateChanged

Added in[version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)  

```
public abstract void onStateChanged (int state)
```

Gets invoked when ChooserManager lifecycle state has changed.

<br />

|                                                                                                                                                                                                           Parameters                                                                                                                                                                                                           ||
|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `state` | `int`: Value is[ChooserSession.STATE_INITIALIZED](https://developer.android.com/reference/android/service/chooser/ChooserSession#STATE_INITIALIZED),[ChooserSession.STATE_STARTED](https://developer.android.com/reference/android/service/chooser/ChooserSession#STATE_STARTED), or[ChooserSession.STATE_CLOSED](https://developer.android.com/reference/android/service/chooser/ChooserSession#STATE_CLOSED) <br /> |