Package io.scanbot.sdk.util.snap
Class SoundControllerImpl
-
- All Implemented Interfaces:
-
io.scanbot.sdk.util.snap.SoundController
public final class SoundControllerImpl implements SoundController
-
-
Field Summary
Fields Modifier and Type Field Description public final static Long
vibrationDurationMs
-
Constructor Summary
Constructors Constructor Description SoundControllerImpl(Context context)
SoundControllerImpl(Context context, Uri bleepUri)
SoundControllerImpl(Context context, Integer bleepResId)
-
Method Summary
Modifier and Type Method Description Unit
setUp()
Prepare SoundController for future sound or vibration playing. Unit
release()
Release resources. Unit
setBleepEnabled(Boolean enable)
Whether actual sound playing is enabled. Unit
setVibrationEnabled(Boolean enable)
Whether actual vibration is enabled. <Error class: unknown class>
playBleepSound()
Attempt to play sound and vibrate, if enabled. Unit
setBleepUri(Uri uri)
Set custom bleep
sound resource from file Uri.Unit
setBleepResId(Integer resId)
Set custom bleep
sound resource from app resources.-
-
Method Detail
-
setUp
Unit setUp()
Prepare SoundController for future sound or vibration playing.
-
setBleepEnabled
Unit setBleepEnabled(Boolean enable)
Whether actual sound playing is enabled.
-
setVibrationEnabled
Unit setVibrationEnabled(Boolean enable)
Whether actual vibration is enabled. NOTE: Vibration feature requires
android.permission.VIBRATE
permission. Add it to the AndroidManifest to use the vibration.
-
playBleepSound
<Error class: unknown class> playBleepSound()
Attempt to play sound and vibrate, if enabled.
-
setBleepUri
Unit setBleepUri(Uri uri)
Set custom
bleep
sound resource from file Uri.
-
setBleepResId
Unit setBleepResId(Integer resId)
Set custom
bleep
sound resource from app resources.
-
-
-
-