Feedback#

Defined in package com.scandit.datacapture.core.feedback

Vibration#
class Vibration

Added in version 6.0.0

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

Vibration()#
Vibration()

Added in version 6.0.0

Creates a new Vibration object.

defaultVibration()#
static @NonNull Vibration defaultVibration()

Added in version 6.0.0

The default vibration for a successful scan.

The duration of vibration is set to 300 milliseconds.

duration#
@NonNull TimeInterval getDuration()

Added in version 6.1.0

The duration of the vibration.

vibrateTime#
@NonNull TimeInterval getVibrateTime()

Added in version 6.0.0

The duration of the vibration.

Deprecated since version 6.1.0: Replaced by duration.

Sound#
class Sound

Added in version 6.0.0

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

Sound()#
Sound(int resourceId)

Added in version 6.0.0

Creates a new Sound object for the given resource.

resourceId#
int getResourceId()

Added in version 6.0.0

Id of the sound resource.

defaultSound()#
static @NonNull Sound defaultSound()

Added in version 6.0.0

The default beep sound for a successful scan.

Feedback#
class Feedback

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.

defaultFeedback()#
static @NonNull Feedback defaultFeedback()

Added in version 6.0.0

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

sound#
@Nullable Sound getSound()

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#
@Nullable Vibration getVibration()

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.

Feedback()#
Feedback()

Added in version 6.0.0

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

Feedback()
Feedback(@Nullable Vibration vibration)

Added in version 6.0.0

Creates a Feedback that emits the given vibration, but plays no sound.

Feedback()
Feedback(@Nullable Sound sound)

Added in version 6.1.0

Creates a Feedback that plays the given sound, but emits no vibration.

Feedback()
Feedback(@Nullable Vibration vibration,
        @Nullable Sound sound)

Added in version 6.0.0

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

emit()#
void emit()

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.

release()#
void release()

Added in version 6.0.0

Frees the resources associated with this feedback instance. This is only required when you are using the feedback instance without a capture mode. When the instance gets used by a capture mode, the resources will automatically be freed when they are no longer required.