I want to play a alarm on my app so i need to know how to inc开发者_开发知识库lude it and to access
You want to include the file as a resource. See Providing Resources.
put your media file (alarm.mp3) inside your res/raw folder.
MediaPlayer mp = MediaPlayer.create(this, R.raw.alarm);
mp.start();
Here´s the documentation Audio and Video Playback
精彩评论