Code example for MediaPlayer

Methods: isPlaying

0
	} 
 
	public void testGetMediaPlayer() { 
		MediaPlayer mediaPlayer = SoundManager.getInstance().getMediaPlayer();
		assertNotNull("SoundManager failed to return a MediaPlayer", mediaPlayer);
		assertFalse("SoundManager provided a MediaPlayer that was already playing", mediaPlayer.isPlaying());
	} 
 
	public void testClear() { 
		SoundManager soundManager = SoundManager.getInstance();
		soundManager.clear();
		assertEquals("SoundManager was destroyed when calling clear", soundManager, SoundManager.getInstance());
 
		MediaPlayer mediaPlayer = SoundManager.getInstance().getMediaPlayer();
		assertNotNull("SoundManager failed to return a MediaPlayer after clear", mediaPlayer);
		assertFalse("SoundManager provided a MediaPlayer that was already playing", mediaPlayer.isPlaying());
	} 
 
	public void testPauseAndResume() throws IllegalStateException, IOException, InterruptedException { 
		final String soundFilePath = soundFile.getAbsolutePath();
Stop searching for code, let great code find you!  Add Codota to your java IDE