play sound android studio kotlin
//make a audio file in the res/raw directory
mediaPlayer = MediaPlayer.create(this, R.raw.FILE_NAME)
mediaPlayer?.start()
play sound android studio kotlin
//make a audio file in the res/raw directory
mediaPlayer = MediaPlayer.create(this, R.raw.FILE_NAME)
mediaPlayer?.start()
play sound on button click android studio
Button one = (Button) this.findViewById(R.id.button1);
final MediaPlayer mp = MediaPlayer.create(this, R.raw.soho);
one.setOnClickListener(new OnClickListener(){
public void onClick(View v) {
mp.start();
}
});
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us