Feedback

Defined in framework ScanditCaptureCore

Vibration
open class Vibration : NSObject

Added in version 6.0.0

A vibration, to be emitted for example when a code has been successfully scanned.

`default`
open class var `default`: Vibration { get }

Added in version 6.0.0

The default vibration for a successful scan.

selectionHapticFeedback
open class var selectionHapticFeedback: Vibration { get }

Added in version 6.7.0

It creates haptics to indicate a change in selection. In particular it uses UISelectionFeedbackGenerator. Please note that if the device does not have the Taptic Engine, no vibration will be emitted.

successHapticFeedback
open class var successHapticFeedback: Vibration { get }

Added in version 6.7.0

It creates haptics to communicate successes. This is a notification feedback type, indicating that a task has completed successfully. In particular it uses UINotificationFeedbackGenerator with type UINotificationFeedbackTypeSuccess. Please note that if the device does not have the Taptic Engine, no vibration will be emitted.

failureHapticFeedback
open class var failureHapticFeedback: Vibration { get }

Added in version 6.14.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.

Only available on iOS.

impactHapticFeedback
open class var impactHapticFeedback: Vibration { get }

Added in version 6.8.0

It creates haptics to communicate impact. In particular it uses UIImpactFeedbackGenerator. Please note that if the device does not have the Taptic Engine, no vibration will be emitted.

jsonString
open var jsonString: String { get }

Added in version 6.9.0

Returns the JSON representation of the vibration.

Sound
open class Sound : NSObject

Added in version 6.0.0

A sound, to be played for example when a code has been successfully scanned.

init
init?(url: URL)

Added in version 6.0.0

Creates a new Sound loading the given file.

init
convenience init?(resourceName: String)

Added in version 6.7.0

Creates a new Sound for the given resource name. The resource should be placed in the main application bundle.

`default`
open class var `default`: Sound { get }

Added in version 6.0.0

The default beep sound for a successful scan.

jsonString
open var jsonString: String { get }

Added in version 6.9.0

Returns the JSON representation of the sound.

Feedback
open class Feedback : NSObject

Added in version 6.0.0

A feedback consisting of a sound and vibration, for example to be provided by a device when a code has been successfully scanned.

init
convenience init(fromJSONString JSONString: String) throws

Added in version 6.3.0

Constructs a new feedback with the provided JSON serialization.

`default`
open class var `default`: Feedback { get }

Added in version 6.0.0

The default feedback consisting of a default sound and a default vibration.

sound
open var sound: Sound? { get }

Added in version 6.0.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
open var vibration: Vibration? { get }

Added in version 6.0.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.

init
convenience init()

Added in version 6.0.0

Creates a Feedback that emits no vibration and plays no sound.

init
init(vibration: Vibration?, sound: Sound?)

Added in version 6.0.0

Creates a Feedback that emits the given vibration and plays the given sound.

emit
open func emit() -> Void

Added in version 6.0.0

Emits the feedback defined by this object. This method is further influenced by the device’s ring mode and/or volume settings - check sound and vibration for more details.

jsonString
open var jsonString: String { get }

Added in version 6.9.0

Returns the JSON representation of the feedback.

WaveFormVibration
open class WaveFormVibration : Vibration

Added in version 6.17.0

A wave form vibration, to be emitted for example when a code has been successfully scanned.

init
convenience init(timings: Array<TimeInterval>)

Added in version 6.17.0

Creates a new WaveFormVibration object with timings.

init
convenience init(timings: Array<TimeInterval>, amplitudes: Array<Float>?)

Added in version 6.17.0

Creates a new WaveFormVibration object with timings and amplitudes.

amplitudes
var amplitudes: Array<Float>? { get }

Added in version 6.17.0

Returns the amplitudes of the WaveFormVibration.

timings
var timings: Array<TimeInterval> { get }

Added in version 6.17.0

Returns the timings of the WaveFormVibration.

jsonString
open var jsonString: String { get }

Added in version 6.17.0

Returns the JSON representation of the vibration.