SoundController

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.

Inheritors

Functions

Link copied to clipboard
abstract suspend fun playBleepSound()

Attempt to play sound and vibrate, if enabled.

Link copied to clipboard
abstract fun release()

Release resources.

Link copied to clipboard
abstract fun setBleepEnabled(enable: Boolean)

Whether actual sound playing is enabled.

Link copied to clipboard
abstract fun setBleepResId(resId: Int)

Set custom bleep sound resource from app resources.

Link copied to clipboard
abstract fun setBleepUri(uri: Uri)

Set custom bleep sound resource from file Uri.

Link copied to clipboard
abstract fun setUp()

Prepare SoundController for future sound or vibration playing.

Link copied to clipboard
abstract fun setVibrationEnabled(enable: Boolean)

Whether actual vibration is enabled. NOTE: Vibration feature requires android.permission.VIBRATE permission. Add it to the AndroidManifest to use the vibration.