https://kotlinlang.org logo
a

Anshumaan Kumar Prasad

03/19/2021, 9:50 AM
Hello ppl! I'm just a beginner in Kotlin, want to play music in my app, with only one touch (button) Pl let anyone get me know how can I go ahead?
google 2
stackoverflow 1
c

Christiano

03/19/2021, 9:53 AM
Ah good way to play sounds in an app is by using the
MediaPlayer
or
SoundPool
. You should Google for some specific tutorials/examples. A couple of starting points could be these: https://www.geeksforgeeks.org/mediaplayer-class-in-android/ https://developer.android.com/reference/android/media/MediaPlayer https://www.geeksforgeeks.org/soundpool-in-android-with-examples/ https://developer.android.com/reference/android/media/SoundPool
👍 1
a

Anshumaan Kumar Prasad

03/19/2021, 9:55 AM
Sounds good! Thanks for your valuable suggestion