Play sound on Android

Resource files shall be placed under app\src\main\res\raw import android.media.AudioManager import android.media.SoundPool import android.os.Build import android.os.Bundle import android.util.Log import android.view.View import androidx.appcompat.app.AppCompatActivity class MainActivity : AppCompatActivity() { private var mCSoundOne: Int = 0 private lateinit var mSoundPool: SoundPool private var mLoaded = false override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) mSoundPool = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)…