CRTC Electronics

Click here to edit subtitle

Play a Sound

import MP3

1.  right click on res.  new.  folder. name=raw. finish

2.  right click on new raw folder. Import. General. File System. next. brows to the mp3 and select it.



Video Tutorial

Download Sound

Declare a variable

in public class MainActivity...  declare a variable

MediaPlayer chime_;

Link

in OnCreate link the variable to you mpe

chime_= MediaPlayer.create(this, R.raw.metal_impacto_forte_0525);

Play sound

when you want to play the sound call .start()

chime_.start();