This is my first post on android-framework. I am having a problem while playing sound with mediaplayer.
the scenario is like this :
I have an application where the user have to click on images on the screen and it plays a sound on click event. The problem is that when i click very quickly 20 - 30 times at one go, i am getting this error :
WARN/WindowManager(): Key dispatching timed out sending to com.XYZ
INFO/ActivityManager(): ANR (application not responding) in process: com.XYZ
INFO/ActivityManager(): Annotation: keyDispatchingTimedOut
i am using this code to play sound on click event ::
private void media(){
if (mMediaPlayer != null) {
mMediaPlayer.stop();
mMediaPlayer.release();
}
mMediaPlayer = MediaPlayer.create(this, R.raw.squash);
mMediaPlayer.start();
}
Any help will be really Appreciated.
Thanks & regards


