¡@

Home 

2014/10/16 ¤W¤È 08:22:07

android Programming Glossary: r.raw.error

Play sound with SoundPool

http://stackoverflow.com/questions/6396711/play-sound-with-soundpool

AudioManager.STREAM_MUSIC spool new SoundPool 10 AudioManager.STREAM_MUSIC 0 soundID spool.load this R.raw.error 1 white Button findViewById R.id.whiteBtn white.setOnClickListener new View.OnClickListener public void onClick View v.. playing correctly if you change the Sound function to this what does it do If your phone is not correctly handling the R.raw.error file format but the emulator is doing it correctly that would be VERY strange. public void Sound AudioManager audioManager..

NullPointerException while using Android's mediaplayer

http://stackoverflow.com/questions/6782109/nullpointerexception-while-using-androids-mediaplayer

notify about right choice or wrong one. This is how I do it MediaPlayer playError MediaPlayer.create QuizActivity.this R.raw.error playError.start Same with correct sound. It works fine most of the time but when I click it many times at random times I.. And falseAnswerPoints is public void falseAnswerPoints MediaPlayer playError MediaPlayer.create QuizActivity.this R.raw.error playError.start Same is correctAnswerPoints but with different sound. That's about it. Sometimes it gives NullPointerException.. void falseAnswerPoints if mPlayingSound mPlayingSound true MediaPlayer playError MediaPlayer.create QuizActivity.this R.raw.error playError.start mPlayingSound being a private boolean member initialized to false and that you would reset to false once..