add Listener
fun addListener(listener: DataSourceListener, type: <Error class: unknown class>, preferences: ParameterList? = null, critical: Boolean = true): Int
Adds a listener to a specific 'dataType'
Parameters
listener
The listener.
type
Type of the data.
preferences
Preferences for specified data type.
critical
Notification critical property. If critical is true, the notification will be sent immediately from sensor thread If critical is false, the notification will be sent when API timer ticks
fun addListener(listener: DataSourceListener, types: ArrayList<Pair<<Error class: unknown class>, ParameterList?>>, critical: Boolean = true)
Adds a listener to a specific 'dataType'
Parameters
listener
The listener.
types
Type list of the data.
critical
Notification critical property. If critical is true, the notification will be sent immediately from sensor thread If critical is false, the notification will be sent when API timer ticks