Best code examples for MediaPlayer setOnInfoListener method (android.media.MediaPlayer.setOnInfoListener)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for MediaPlayer setOnInfoListener method.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

MediaPlayer setOnInfoListener examples from Open Source projects
This code example shows how to use the following methods: setOnInfoListener
213:	player.setOnInfoListener(listener); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: prepareAsync, setDataSource, setOnCompletionListener, setOnErrorListener, setOnInfoListener
29:	player = new MediaPlayer(); 
30:	player.setDataSource(path); 
-
32:	player.setOnPreparedListener(listenerActivity); 
33:	player.setOnInfoListener(listenerActivity); 
34:	player.setOnErrorListener(listenerActivity); 
35:	player.setOnCompletionListener(listenerActivity); 
-
44:	player.prepareAsync(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setOnBufferingUpdateListener, setOnCompletionListener, setOnErrorListener, setOnInfoListener, setOnPreparedListener
50:	mMediaPlayer = new MediaPlayer(); 
51:	mMediaPlayer.setOnBufferingUpdateListener(this); 
52:	mMediaPlayer.setOnCompletionListener(this); 
53:	mMediaPlayer.setOnErrorListener(this); 
54:	mMediaPlayer.setOnInfoListener(this); 
55:	mMediaPlayer.setOnPreparedListener(this); 
56:	mMediaPlayer.setOnSeekCompleteListener(this); 
57:	mMediaPlayer.setOnVideoSizeChangedListener(this); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: prepareAsync, setDataSource, setOnCompletionListener, setOnInfoListener, setOnPreparedListener
64:	mMediaPlayer = new MediaPlayer(); 
65:	mMediaPlayer.setOnCompletionListener(mMediaPlayerOnCompletionListener); 
66:	mMediaPlayer.setOnPreparedListener(mMediaPlayerOnPreparedListener); 
67:	mMediaPlayer.setOnInfoListener(mMediaPlayerOnInfoListener); 
-
72:	mMediaPlayer.setDataSource(mAudio.getUrl()); 
73:	mMediaPlayer.prepareAsync(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setDisplay, setOnBufferingUpdateListener, setOnCompletionListener, setOnErrorListener, setOnInfoListener
52:	player = new MediaPlayer(); 
-
54:	player.setDisplay(holder); 
55:	player.setScreenOnWhilePlaying(true); 
56:	player.setOnPreparedListener(this); 
57:	player.setOnBufferingUpdateListener(this); 
58:	player.setOnErrorListener(this); 
59:	player.setOnCompletionListener(this); 
60:	player.setOnInfoListener(this); 
61:	player.setOnSeekCompleteListener(this); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setOnBufferingUpdateListener, setOnCompletionListener, setOnErrorListener, setOnInfoListener, setOnPreparedListener
141:	mediaPlayer = new MediaPlayer(); 
142:	mediaPlayer.setOnBufferingUpdateListener(this); 
143:	mediaPlayer.setOnCompletionListener(this); 
144:	mediaPlayer.setOnErrorListener(this); 
145:	mediaPlayer.setOnInfoListener(this); 
146:	mediaPlayer.setOnPreparedListener(this); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: prepareAsync, setAudioStreamType, setDataSource, setOnBufferingUpdateListener, setOnCompletionListener
63:	mMediaPlayer = new MediaPlayer(); 
64:	mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); 
-
66:	mMediaPlayer.setDataSource(radio.getUrl()); 
-
72:	mMediaPlayer.setOnBufferingUpdateListener(this); 
73:	mMediaPlayer.setOnInfoListener(this); 
74:	mMediaPlayer.setOnPreparedListener(this); 
75:	mMediaPlayer.setOnErrorListener(this); 
76:	mMediaPlayer.setOnCompletionListener(this); 
77:	mMediaPlayer.prepareAsync(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: prepareAsync, setAudioStreamType, setDataSource, setOnBufferingUpdateListener, setOnCompletionListener
66:	mMediaPlayer = new MediaPlayer(); 
67:	mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); 
-
69:	mMediaPlayer.setDataSource(kajian.getLink()); 
-
74:	mMediaPlayer.setOnBufferingUpdateListener(this); 
75:	mMediaPlayer.setOnInfoListener(this); 
76:	mMediaPlayer.setOnPreparedListener(this); 
77:	mMediaPlayer.setOnErrorListener(this); 
78:	mMediaPlayer.setOnCompletionListener(this); 
79:	mMediaPlayer.prepareAsync(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setLooping, setOnInfoListener, setOnSeekCompleteListener
81:	mediaPlayer.setLooping( isLooping ); 
-
100:	mediaPlayer.setOnSeekCompleteListener( this ); 
101:	mediaPlayer.setOnInfoListener( this ); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setOnBufferingUpdateListener, setOnCompletionListener, setOnErrorListener, setOnInfoListener, setOnPreparedListener
180:	mMediaPlayer = new MediaPlayer(); 
181:	mMediaPlayer.setWakeMode(getApplicationContext(), PowerManager.PARTIAL_WAKE_LOCK); 
182:	mMediaPlayer.setOnBufferingUpdateListener(this); 
183:	mMediaPlayer.setOnCompletionListener(this); 
184:	mMediaPlayer.setOnErrorListener(this); 
185:	mMediaPlayer.setOnInfoListener(this); 
186:	mMediaPlayer.setOnPreparedListener(this); 
187:	mMediaPlayer.setOnSeekCompleteListener(this); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: isPlaying, prepareAsync, release, setDataSource, setOnCompletionListener
78:	mediaPlayer = new MediaPlayer(); 
-
80:	.setOnCompletionListener((OnCompletionListener) rootActivity); 
-
82:	.setOnErrorListener((OnErrorListener) rootActivity); 
-
84:	.setOnInfoListener((OnInfoListener) rootActivity); 
-
86:	.setOnPreparedListener((OnPreparedListener) rootActivity); 
-
88:	mediaPlayer.setDataSource(STREAM_URI); 
-
90:	onError(mediaPlayer, -1, -1); 
-
93:	onError(mediaPlayer, -1, -1); 
-
96:	onError(mediaPlayer, -1, -1); 
-
102:	if (isPlaying || (mediaPlayer != null && mediaPlayer.isPlaying()) ) { 
-
104:	if(mediaPlayer.isPlaying()){ 
105:	mediaPlayer.stop(); 
-
107:	mediaPlayer.release(); 
-
116:	mediaPlayer.prepareAsync(); 
-
120:	onError(mediaPlayer, -1, -1); 
Full Snippet Info
4
CodeRank
Related MediaPlayer setOnInfoListener Questions & Answers:
setOnInfoListener Method Overview
Register a callback to be invoked when an info/warning is available.
See Also