# OnScreenResultListener

Artifact: [androidx.car.app:app](https://developer.android.com/jetpack/androidx/releases/car-app) [View Source](https://cs.android.com/search?q=file:androidx/car/app/OnScreenResultListener.java+class:androidx.car.app.OnScreenResultListener) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.0.0)

*** ** * ** ***


```
interface OnScreenResultListener
```

<br />

*** ** * ** ***

A listener to provide the result set by a `https://developer.android.com/reference/kotlin/androidx/car/app/Screen`.

## Summary

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/OnScreenResultListener#onScreenResult(java.lang.Object)(result: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` Provides the `result` from the `https://developer.android.com/reference/kotlin/androidx/car/app/Screen` that was pushed using `https://developer.android.com/reference/kotlin/androidx/car/app/ScreenManager#pushForResult(androidx.car.app.Screen,androidx.car.app.OnScreenResultListener)`, or `null` if no result was set. |

## Public functions

### onScreenResult

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.0.0)

```
fun onScreenResult(result: Any?): Unit
```

Provides the `result` from the `https://developer.android.com/reference/kotlin/androidx/car/app/Screen` that was pushed using `https://developer.android.com/reference/kotlin/androidx/car/app/ScreenManager#pushForResult(androidx.car.app.Screen,androidx.car.app.OnScreenResultListener)`, or `null` if no result was set.

This callback will be called right before the `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle.State` of the `https://developer.android.com/reference/kotlin/androidx/car/app/Screen` that set the `result` becomes `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle.State#DESTROYED`.

| Parameters |
|---|---|
| `result: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?` | the result provided by the `https://developer.android.com/reference/kotlin/androidx/car/app/Screen` that was pushed using `https://developer.android.com/reference/kotlin/androidx/car/app/ScreenManager#pushForResult(androidx.car.app.Screen,androidx.car.app.OnScreenResultListener)` or `null` if no result was set |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/car/app/Screen#setResult(java.lang.Object)` |   |