Code example for MediaPlayer

Methods: getDuration

0
		this.rightVol = rightVol;
	} 
 
	public int getDuration() { 
		if (mp != null)
			return mp.getDuration();
		return -1; 
	} 
 
	public int getCurrentPosition() { 
		if (mp != null)
			return mp.getCurrentPosition();
		return -1; 
	} 
	 
	public boolean isPlaying() { 
		if (mp != null)
			return mp.isPlaying();
		return false; 
	}