Hi,
I was working on a simple bubblewrap app in order to learn the android framework, and was wondering how I could play the 'pop' sound clip every time the user touches a bubble.
Thanks in advance
Hi,
I was working on a simple bubblewrap app in order to learn the android framework, and was wondering how I could play the 'pop' sound clip every time the user touches a bubble.
Thanks in advance
Use a SoundPool
combined with an OnTouchListener
.
In your onTouch(..)
method you would simply do a SoundPool.play(YOURAUDIOFILE, 1, 1, 1, 0, 1);
Gl hf
I know it's a cop out to just link to someone else's explanation, but I had to do the exact same thing, and here's the tutorial I used: http://www.droidnova.com/creating-sound-effects-in-android-part-2,695.html