On Thu, Mar 17, 2011 at 6:24 PM, brian purgert <[email protected]> wrote: > http://developer.android.com/guide/topics/media/index.html > > MediaPlayer mp = new MediaPlayer(); > > mp.setDataSource(PATH_TO_FILE); > > mp.prepare(); > > mp.start(); > > I have a file in my res/raw folder called song2 and I don't know what to put > for PATH_TO_FILE
You don't do it that way. Use the static create() method on MediaPlayer and pass in R.raw.song2. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in Oslo: http://bit.ly/fjBo24 -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

