OnErrorListener

fun interface OnErrorListener<T : IntervalDetector<T, *, *, *, *, *, *>>

Interface to notify when an error occurs.

Parameters

T

an implementation of IntervalDetector

Functions

Link copied to clipboard
abstract fun onError(detector: T, reason: ErrorReason)

Called when an error is detected, either at initialization because excessive changes in sensor measurements are found, or because sensor becomes unreliable. When an error occurs, detector is stopped and needs to be restarted to be used again.