# 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)

*** ** * ** ***


```
public interface OnScreenResultListener
```

<br />

*** ** * ** ***

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

## Summary

| ### Public methods |
|---|---|
| `abstract void` | `https://developer.android.com/reference/androidx/car/app/OnScreenResultListener#onScreenResult(java.lang.Object)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/Object.html result)` Provides the `result` from the `https://developer.android.com/reference/androidx/car/app/Screen` that was pushed using `https://developer.android.com/reference/androidx/car/app/ScreenManager#pushForResult(androidx.car.app.Screen,androidx.car.app.OnScreenResultListener)`, or `null` if no result was set. |

## Public methods

### onScreenResult

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

```
abstract void onScreenResult(@Nullable Object result)
```

Provides the `result` from the `https://developer.android.com/reference/androidx/car/app/Screen` that was pushed using `https://developer.android.com/reference/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/androidx/lifecycle/Lifecycle.State` of the `https://developer.android.com/reference/androidx/car/app/Screen` that set the `result` becomes `https://developer.android.com/reference/androidx/lifecycle/Lifecycle.State#DESTROYED`.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/Object.html result` | the result provided by the `https://developer.android.com/reference/androidx/car/app/Screen` that was pushed using `https://developer.android.com/reference/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/androidx/car/app/Screen#setResult(java.lang.Object)` |   |