What would be wrong with this:
@Override
public void onClick(View view) {
MediaPlayer mp = MediaPlayer.create(this, R.raw.a2);
mp.start();
}

That requires a sound file a2.mp3 in the res/raw folder (or some other
supported media).

HTH

Ludwig


2008/10/9 [EMAIL PROTECTED] <[EMAIL PROTECTED]>

>
> I want to play audio when a button is clicked.
> 16.03.2008 redhunt writed as he solved this problem.
> It hhelp me in m5.
> But in 9beta and 1.0_r1 it does not work.
> I can't type button many times with good sound.
> Can anybody help me?
> Thank's.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to