I am trying to play click sound on image (ImageView/Button) click and I saw an example here. I have also tried to use this:
profile_pick.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
v.playSoundEffect(android.view.SoundEffectConstants.CLICK);
Intent i=new Intent(getApplicationContext(),Profile_pic.class);
startActivity(i);
overridePendingTransition(R.anim.animation,R.anim.animation2);
}
});
but it's not working. Can anyone suggest how to do this?
(Adding a raw sound is not a good idea so I would prefer to use a use system sound... )