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