[android-developers] sound player
So, I wanted to create a simple sound player that will just play a
sound when I touch a button. I created it without errors but it
crashes everytime i run it. I got rid of all the extra code and found
that the error is coming from the media player initialization
public MediaPlayer music = MediaPlayer.create
(getApplicationContext(), R.raw.sound_1);
I believe this is due to my lack of understanding context. i need some
help figuring out what context to put into the first parameter.
thanks in advance
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home