No if you want to play an audio file and forget about it you can do the following:
val mp: MediaPlayer = MediaPlayer.create(
this,
R.raw.<id_of _your_audio_file>
)
mp.start()
mp.setOnCompletionListener { mp -> mp.release() }
No if you want to play an audio file and forget about it you can do the following:
val mp: MediaPlayer = MediaPlayer.create(
this,
R.raw.<id_of _your_audio_file>
)
mp.start()
mp.setOnCompletionListener { mp -> mp.release() }
Full mobile stack developer, researcher, simulation software developer, and parent.
Love podcasts or audiobooks? Learn on the go with our new app.