chore: clean

This commit is contained in:
rebel onion
2025-01-06 08:22:44 -06:00
parent 31a67c8edb
commit f9f9767ecc
106 changed files with 855 additions and 584 deletions

View File

@@ -6,11 +6,16 @@ import android.media.MediaPlayer
class AudioHelper(private val context: Context) {
private val audioManager: AudioManager = context.getSystemService(Context.AUDIO_SERVICE) as AudioManager
private val audioManager: AudioManager =
context.getSystemService(Context.AUDIO_SERVICE) as AudioManager
private var mediaPlayer: MediaPlayer? = null
fun routeAudioToSpeaker() {
audioManager.requestAudioFocus(null, AudioManager.STREAM_MUSIC, AudioManager.AUDIOFOCUS_GAIN)
audioManager.requestAudioFocus(
null,
AudioManager.STREAM_MUSIC,
AudioManager.AUDIOFOCUS_GAIN
)
audioManager.mode = AudioManager.MODE_IN_COMMUNICATION
audioManager.isSpeakerphoneOn = true
}