Feedback
Defined in package com.scandit.datacapture.core
- Vibration
class VibrationAdded in version 8.6.0
A vibration, to be emitted for example when a code has been successfully scanned.
- defaultVibration()
fun Vibration.defaultVibration(): Vibration
Added in version 8.6.0
The default vibration for a successful scan.
- selectionHapticFeedback()
fun Vibration.selectionHapticFeedback(): Vibration
Added in version 8.6.0
Haptic feedback indicating a change in selection. iOS-backed; on Android this falls back to the default vibration.
- successHapticFeedback()
fun Vibration.successHapticFeedback(): Vibration
Added in version 8.6.0
Haptic feedback for a successful scan. iOS-backed; on Android this falls back to the default vibration.
- failureHapticFeedback()
fun Vibration.failureHapticFeedback(): Vibration
Added in version 8.6.0
It creates haptics to communicate failures. This is a notification feedback type, indicating that a task has failed. In particular it uses UINotificationFeedbackGenerator with type UINotificationFeedbackTypeError. Please note that if the device does not have the Taptic Engine, no vibration will be emitted.
On Android this falls back to the default vibration.
- Sound
class SoundAdded in version 8.6.0
A sound, to be played for example when a code has been successfully scanned.
- Feedback
class FeedbackAdded in version 8.6.0
A feedback consisting of a sound and vibration, for example to be provided by a device when a code has been successfully scanned.
- defaultFeedback()
fun Feedback.defaultFeedback(): Feedback
Added in version 8.6.0
The default feedback consisting of a default sound and a default vibration.
- sound
var sound: Sound?
Added in version 8.6.0
The sound to be played when a feedback is required. If null, no sound is played. Depending on the device’s ring mode and/or volume settings, no sound may be played even if this property is properly set to a non-null instance.
- vibration
var vibration: Vibration?
Added in version 8.6.0
The vibration to be emitted when a feedback is required. If null, no vibration is emitted. This property is further influenced by the device’s ring mode: the device may not vibrate even if this property is properly set to a non-null instance.
- WaveFormVibration
class WaveFormVibration : Vibration
Added in version 8.6.0
A wave form vibration, to be emitted for example when a code has been successfully scanned.
The
timingsarray must be non-empty. Ifamplitudesis provided, it must contain the same number of elements astimings.- WaveFormVibration()
WaveFormVibration(timings: LongArray)Added in version 8.6.0
Creates a new WaveFormVibration object with timings.
- WaveFormVibration()
WaveFormVibration(timings: LongArray, amplitudes: IntArray?)Added in version 8.6.0
Creates a new WaveFormVibration object with timings and amplitudes.
- amplitudes
val amplitudes: IntArray?Added in version 8.6.0
Returns the amplitudes of the WaveFormVibration.
- timings
val timings: LongArrayAdded in version 8.6.0
Returns the timings of the WaveFormVibration.