The Android Developer Challenge is back! Submit your idea before December 2.

Observer

interface Observer<T : Any!>
androidx.camera.core.Observable.Observer

A callback that can receive new values and errors from an Observable.

Summary

Public methods

abstract Unit
onError(@NonNull t: Throwable)

Called when the stream emits an error.

abstract Unit
onNewData(@Nullable value: T?)

Called when the stream emits a new piece of data.

Public methods

onError

abstract fun onError(@NonNull t: Throwable): Unit

Called when the stream emits an error.

Parameters
t Throwable: The error.

onNewData

abstract fun onNewData(@Nullable value: T?): Unit

Called when the stream emits a new piece of data.

Parameters
value T?: The new data value