Android Dev Summit, October 23-24: two days of technical content, directly from the Android team. Sign-up for livestream updates.

Observable.Observer

public static interface Observable.Observer

androidx.camera.core.Observable.Observer<T>


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

Summary

Public methods

abstract void onError(Throwable t)

Called when the stream emits an error.

abstract void onNewData(T value)

Called when the stream emits a new piece of data.

Public methods

onError

public abstract void onError (Throwable t)

Called when the stream emits an error.

Parameters
t Throwable: The error.

onNewData

public abstract void onNewData (T value)

Called when the stream emits a new piece of data.

Parameters
value T: The new data value