Code example for MediaPlayer.OnCompletionListener

Methods: onCompletion

0
		public void onCompletion(MediaPlayer mp) { 
			if (mMediaController != null) { 
				mMediaController.hide(); 
			} 
			if (mOnCompletionListener != null) { 
				mOnCompletionListener.onCompletion(mMediaPlayer); 
			} 
		} 
	}; 
 
	private MediaPlayer.OnErrorListener mErrorListener = new MediaPlayer.OnErrorListener() {
		public boolean onError(MediaPlayer mp, int framework_err, int impl_err) { 
			if (mMediaController != null) { 
				mMediaController.hide(); 
			} 
 
			if (mOnErrorListener != null) { 
				if (mOnErrorListener.onError(mMediaPlayer, framework_err, 
						impl_err)) { 
					return true; 
				}