I want to play a alarm on my app so i need to know how to include it and to access
thanks so now i have InputStream is = Resources.getSystem().openRawResource(R.raw.alarm); but how can i access the file with the media player?
Hans Wurst
2010-08-31 18:40:34
You can create a media player instance with a reference to a resource id: http://developer.android.com/reference/android/media/MediaPlayer.html#create%28android.content.Context,%20int%29
Mayra
2010-08-31 18:54:47
A:
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
Jorgesys
2010-08-31 20:56:48