Basic Sound Player Using Tutorial

1. The following is the sample code of using audio sound in application:

final MediaPlayer presssoundyes = MediaPlayer.create(PressMax.this,R.raw.beep);
if(presssoundyes.isPlaying())
				{
					presssoundyes.seekTo(0);
				}
				else
				{
					presssoundyes.start();
				}

Happy playing 🙂

Advertisements