android-components / mozilla.components.support.base.observer / ObserverRegistry / register

# register

`fun register(observer: T): Unit` (source)

Overrides Observable.register

Registers an observer to get notified about changes.

### Parameters

`observer` - the observer to register.

`fun register(observer: T, owner: LifecycleOwner, autoPause: Boolean): Unit` (source)

Overrides Observable.register

Registers an observer to get notified about changes.

The observer will automatically unsubscribe if the lifecycle of the provided LifecycleOwner becomes DESTROYED.

### Parameters

`observer` - the observer to register.

`owner` - the lifecycle owner the provided observer is bound to.

`autoPause` - whether or not the observer should automatically be paused/resumed with the bound lifecycle.

`fun register(observer: T, view: View): Unit` (source)

Overrides Observable.register

Registers an observer to get notified about changes.

The observer will automatically unsubscribe if the provided view gets detached.

### Parameters

`observer` - the observer to register.

`view` - the view the provided observer is bound to.