Dieter Holz
11/12/2020, 9:58 AMprivate val soundPlayer by lazy { MediaPlayer.create(context, R.raw.transporter) }
soundPlayer.start()
R.raw.transporter is a mp3-File
Any hints?allan.conda
11/12/2020, 10:20 AMHalil Ozercan
11/12/2020, 10:28 AMplay
Dieter Holz
11/12/2020, 11:11 AMfun playSound(){
if(!soundPlayer.isPlaying){
soundPlayer.start()
}
}
And this is called from the UI, triggered by an onClick of a Button