Code example for MediaController.MediaPlayerControl

Methods: getDuration, seekTo

0
				// We're not interested in programmatically generated changes to 
				// the progress bar's position. 
				return; 
			} 
 
			long duration = playerControl.getDuration(); 
			long newposition = (long) progressToTimer(progress, (int) duration); 
			playerControl.seekTo((int) newposition); 
			if (time_current != null) 
			{ 
				time_current.setText(stringForTime((int) newposition)); 
			} 
		} 
 
		public void onStopTrackingTouch(SeekBar bar) 
		{ 
			isDragging = false; 
			setProgress(); 
			updatePausePlay(); 
			show(defaultShowTimeout);