# DynamicTypeValueReceiver

Artifact: [androidx.wear.protolayout:protolayout-expression-pipeline](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/expression/pipeline/DynamicTypeValueReceiver.java+class:androidx.wear.protolayout.expression.pipeline.DynamicTypeValueReceiver) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

*** ** * ** ***


```
public interface DynamicTypeValueReceiver<T>
```

<br />

*** ** * ** ***

Callback for an evaluation result. This is intended to support two-step updates; first a notification will be sent that the evaluation result item will be updated, then the new evaluation result will be delivered. This allows downstream consumers to properly synchronize their updates if they depend on two or more evaluation result items, rather than updating multiple times (with potentially invalid states).

| Parameters |
|---|---|
| `<T>` | Data type. |

## Summary

| ### Public methods |
|---|---|
| `abstract void` | `https://developer.android.com/reference/androidx/wear/protolayout/expression/pipeline/DynamicTypeValueReceiver#onData(T)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T newData)` Called when the dynamic type that this callback was registered for has a new evaluation result. |
| `abstract void` | `https://developer.android.com/reference/androidx/wear/protolayout/expression/pipeline/DynamicTypeValueReceiver#onInvalidated()()` Called when the dynamic type that this callback was registered for has an invalid result. |

## Public methods

### onData

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

```
abstract void onData(@NonNull T newData)
```

Called when the dynamic type that this callback was registered for has a new evaluation result.

### onInvalidated

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

```
abstract void onInvalidated()
```

Called when the dynamic type that this callback was registered for has an invalid result.