MediaPlayer setOnBufferingUpdateListener - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for MediaPlayer setOnBufferingUpdateListener method.

This code example shows how to use the following methods: setOnBufferingUpdateListener, setOnCompletionListener, start
		return duration;
	} 
 
	public void onPrepared(MediaPlayer mPlayer) {
		if (isPlaying) {
			mPlayer.setOnCompletionListener(this);
			mPlayer.setOnBufferingUpdateListener(new OnBufferingUpdateListener()
			{ 
				public void onBufferingUpdate(MediaPlayer mPlayer, int percent)
				{ 
					/* TODO: call back, e.g. update outer progress bar */ 
					Log.d("AudioOnBufferingUpdate", "percent: " + percent); 
				} 
			}); 
			mPlayer.start();
		} 
	} 
 
	public boolean onError(MediaPlayer mPlayer, int arg1, int arg2) {
		Log.e("AUDIO onError", "error " + arg1 + " " + arg2);
Full Snippet Info
8
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: setAudioStreamType, setOnBufferingUpdateListener, setOnCompletionListener, setOnErrorListener, setOnPreparedListener
This code example shows how to use the following methods: setOnBufferingUpdateListener, setOnCompletionListener, start
		return duration;
	} 
 
	public void onPrepared(MediaPlayer mPlayer) {
		if (isPlaying) {
			mPlayer.setOnCompletionListener(this);
			mPlayer.setOnBufferingUpdateListener(new OnBufferingUpdateListener()
			{ 
				public void onBufferingUpdate(MediaPlayer mPlayer, int percent)
				{ 
					/* TODO: call back, e.g. update outer progress bar */ 
					Log.d("AudioOnBufferingUpdate", "percent: " + percent); 
				} 
			}); 
			mPlayer.start();
		} 
	} 
 
	public boolean onError(MediaPlayer mPlayer, int arg1, int arg2) {
		Log.e("AUDIO onError", "error " + arg1 + " " + arg2);
Full Snippet Info
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: prepare, setAudioStreamType, setDataSource, setDisplay, setOnBufferingUpdateListener
This code example shows how to use the following methods: setOnBufferingUpdateListener, setOnCompletionListener, start
		return duration;
	} 
 
	public void onPrepared(MediaPlayer mPlayer) {
		if (isPlaying) {
			mPlayer.setOnCompletionListener(this);
			mPlayer.setOnBufferingUpdateListener(new OnBufferingUpdateListener()
			{ 
				public void onBufferingUpdate(MediaPlayer mPlayer, int percent)
				{ 
					/* TODO: call back, e.g. update outer progress bar */ 
					Log.d("AudioOnBufferingUpdate", "percent: " + percent); 
				} 
			}); 
			mPlayer.start();
		} 
	} 
 
	public boolean onError(MediaPlayer mPlayer, int arg1, int arg2) {
		Log.e("AUDIO onError", "error " + arg1 + " " + arg2);
Full Snippet Info
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE

Related MediaPlayer setOnBufferingUpdateListener Questions & Answers:

setOnBufferingUpdateListener Method Overview
Register a callback to be invoked when the status of a network stream's buffer has changed.
See Code Examples for other Android MediaPlayer Methods: