¡@

Home 

2014/10/16 ¤W¤È 08:19:39

android Programming Glossary: mp.getduration

Android: How to create video player?

http://stackoverflow.com/questions/1188346/android-how-to-create-video-player

TAG ex.getMessage try mp.prepare Log.v TAG Duration mp.getDuration catch IllegalStateException e TODO Auto generated catch block..

android: how do i use the progress bar?

http://stackoverflow.com/questions/2967337/android-how-do-i-use-the-progress-bar

progressBar.setProgress 0 progressBar.setMax mp.getDuration new Thread this .start if v.equals stop mp null mp.stop .. @Override public void run int currentPosition 0 int total mp.getDuration while mp null currentPosition total try Thread.sleep 1000..

What is the best way to get an audio file duration in Android?

http://stackoverflow.com/questions/4709883/what-is-the-best-way-to-get-an-audio-file-duration-in-android

d.getStartOffset d.getLength mp.prepare int duration mp.getDuration ... On a side note this question has already been asked but..

Android “Only the original thread that created a view hierarchy can touch its views.”

http://stackoverflow.com/questions/5161951/android-only-the-original-thread-that-created-a-view-hierarchy-can-touch-its-vi

appService.getMP appService.playSong title progress.setMax mp.getDuration new Thread Song.this .start public void onServiceDisconnected.. R.id.progress ... public void run int pos 0 int total mp.getDuration while mp null pos total try Thread.sleep 1000 pos appService.getSongPosition..

Android media player and seekbar sync issue

http://stackoverflow.com/questions/5242918/android-media-player-and-seekbar-sync-issue

gs.playSong gs.songindex cur_time break case R.id.pause gs.mp.getDuration gs.mp.pause break case R.id.nxt gs.nextSong break return true.. generated method stub int currentPosition 0 int total gs.mp.getDuration seekbar.setMax total while gs.mp null currentPosition total.. MEDIA_PATH songs.get position mp.prepare song_dur mp.getDuration mp.seekTo cur_pos mp.start duration position mp.setOnCompletionListener..

Android: How to create video player?

http://stackoverflow.com/questions/1188346/android-how-to-create-video-player

void run try setDataSource mPath catch Exception ex Log.e TAG ex.getMessage try mp.prepare Log.v TAG Duration mp.getDuration catch IllegalStateException e TODO Auto generated catch block e.printStackTrace catch IOException e TODO Auto generated..

android: how do i use the progress bar?

http://stackoverflow.com/questions/2967337/android-how-do-i-use-the-progress-bar

R.string.PlayingMedia progressBar.setVisibility ProgressBar.VISIBLE progressBar.setProgress 0 progressBar.setMax mp.getDuration new Thread this .start if v.equals stop mp null mp.stop mp null status.setText R.string.Stopped progressBar.setVisibility.. R.string.Stopped progressBar.setVisibility ProgressBar.GONE @Override public void run int currentPosition 0 int total mp.getDuration while mp null currentPosition total try Thread.sleep 1000 currentPosition mp.getCurrentPosition catch InterruptedException..

What is the best way to get an audio file duration in Android?

http://stackoverflow.com/questions/4709883/what-is-the-best-way-to-get-an-audio-file-duration-in-android

.openFd fileName mp.reset mp.setDataSource d.getFileDescriptor d.getStartOffset d.getLength mp.prepare int duration mp.getDuration ... On a side note this question has already been asked but got no answers. android audio media player duration soundpool..

Android “Only the original thread that created a view hierarchy can touch its views.”

http://stackoverflow.com/questions/5161951/android-only-the-original-thread-that-created-a-view-hierarchy-can-touch-its-vi

SeekBar.VISIBLE progress.setProgress 0 mp appService.getMP appService.playSong title progress.setMax mp.getDuration new Thread Song.this .start public void onServiceDisconnected ComponentName classname appService null public void onCreate.. setContentView R.layout.song ... progress SeekBar findViewById R.id.progress ... public void run int pos 0 int total mp.getDuration while mp null pos total try Thread.sleep 1000 pos appService.getSongPosition catch InterruptedException e return catch Exception..

Android media player and seekbar sync issue

http://stackoverflow.com/questions/5242918/android-media-player-and-seekbar-sync-issue

case R.id.prev gs.prevSong break case R.id.play gs.playSong gs.songindex cur_time break case R.id.pause gs.mp.getDuration gs.mp.pause break case R.id.nxt gs.nextSong break return true public void myClickHandler View view switch view.getId case.. generated method stub @Override public void run TODO Auto generated method stub int currentPosition 0 int total gs.mp.getDuration seekbar.setMax total while gs.mp null currentPosition total try Thread.sleep 1000 currentPosition gs.mp.getCurrentPosition.. int position final int cur_pos try mp.reset mp.setDataSource MEDIA_PATH songs.get position mp.prepare song_dur mp.getDuration mp.seekTo cur_pos mp.start duration position mp.setOnCompletionListener new OnCompletionListener public void onCompletion..