Fügen Sie RSW Tesource zu ArrayList in Kotlin hinzu

var sound: Uri = Uri.parse("android.resource://" + getPackageName() + "/" + R.raw.danger_alarm_sound)

val mediaPlayer: MediaPlayer
            mediaPlayer =
                MediaPlayer.create(
                    applicationContext,
                    sound
                )
            mediaPlayer.start()
Elated Eel