Package io.scanbot.sdk.util.snap
Interface SoundController
-
- All Implemented Interfaces:
public interface SoundController
Encapsulates playing 'bleep' sound and setting up/releasing corresponding resources. NOTE: Vibration feature requires
android.permission.VIBRATE
permission. Add it to the AndroidManifest to use vibration.
-
-
Method Summary
Modifier and Type Method Description abstract Unit
setUp()
Prepare SoundController for future sound or vibration playing. abstract Unit
release()
Release resources. abstract Unit
setBleepEnabled(Boolean enable)
Whether actual sound playing is enabled. abstract Unit
setVibrationEnabled(Boolean enable)
Whether actual vibration is enabled. abstract Unit
setBleepUri(Uri uri)
Set custom bleep
sound resource from file Uri.abstract Unit
setBleepResId(Integer resId)
Set custom bleep
sound resource from app resources.abstract Unit
playBleepSound()
Attempt to play sound and vibrate, if enabled. -
-
Method Detail
-
setUp
abstract Unit setUp()
Prepare SoundController for future sound or vibration playing.
-
setBleepEnabled
abstract Unit setBleepEnabled(Boolean enable)
Whether actual sound playing is enabled.
-
setVibrationEnabled
abstract 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.
-
setBleepUri
abstract Unit setBleepUri(Uri uri)
Set custom
bleep
sound resource from file Uri.
-
setBleepResId
abstract Unit setBleepResId(Integer resId)
Set custom
bleep
sound resource from app resources.
-
playBleepSound
abstract Unit playBleepSound()
Attempt to play sound and vibrate, if enabled.
-
-
-
-