Code example for MediaPlayer

Methods: isPlayingprepareseekTostop

0
	 
	public static void stopMusic() 
	{ 
		if(mPlayer != null)
		{ 
			if(mPlayer.isPlaying())
			{ 
				mPlayer.stop();
				try 
				{ 
					mPlayer.prepare();
					mPlayer.seekTo(0);
				} 
				catch (IOException e)
				{ 
					// do nothing here FIXME 
				} 
			} 
		} 
	} 
Experience pair programming with AI  Get Codota for Java