# Observer

Artifact: [androidx.lifecycle:lifecycle-livedata-core](https://developer.android.com/jetpack/androidx/releases/lifecycle) [View Source](https://cs.android.com/search?q=file:androidx/lifecycle/Observer.kt+class:androidx.lifecycle.Observer) Added in [2.0.0](https://developer.android.com/jetpack/androidx/releases/lifecycle#2.0.0)

*** ** * ** ***

Common/AllAndroid/JVM
- android

  ```
  fun interface Observer<T : Any?>
  ```

*** ** * ** ***

A simple callback that can receive from `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData`.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` | LiveData - for a usage description. |

## Summary

| ### Public functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/lifecycle/Observer#onChanged(kotlin.Any)(value: T)` Called when the data is changed to `https://developer.android.com/reference/kotlin/androidx/lifecycle/Observer#onChanged(kotlin.Any)`. | android |

## Public functions

### onChanged

android Added in [2.0.0](https://developer.android.com/jetpack/androidx/releases/lifecycle#2.0.0)

```
fun onChanged(value: T): Unit
```

Called when the data is changed to `https://developer.android.com/reference/kotlin/androidx/lifecycle/Observer#onChanged(kotlin.Any)`.