Alessandro
Jul 2, 2021

--

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() }

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Alessandro
Alessandro

Written by Alessandro

Full mobile stack developer, researcher, simulation software developer, and parent.

No responses yet

Write a response