Is there a way to show the progress of a song playing with a progress bar and possibly length in terms of minutes and seconds? I would like it in the status bar, but I know how to do that using a custom notification layout so if someone steers me in the right direction that would be nice. Either with some code or code examples, thanks.
You obviously have to tie in with the NotificationManager classes the progress of the player/mp3. There was a question on SO that may have what you need... Also take a look at this for just basic Progress bar. And of course read the documentation on ProgressBar and Status Bar
To get the minutes left to play song, I know VLC player doesn't do that for my SlimDevices server. If you want to do this from via streaming you will have to get the length of the song, then implement your own timer as I am pretty sure that streaming music does not give you the current time left to play song.
Related
Is there a way to disable the seekbar in expanded controller view in android Chromecast SDK V3?
Facing an issue with the progress bar seek for LIVE videos. The playback is getting hanged while seeking. This issue is also seen in cast-videosAndroid sample app.
Well, like the answer of Ali Naddaf here, if it is your own application, then don't add the progress bar in the first place.
Other developers hide the video view's Seekbar or Progressbar in android by setting the setMediaController to null.
videoView.setMediaController(null);
For more information, check this SO question and this ProgressBar documentation.
I'm trying to create an android application with video cutting facility. For that I need to create a seekbar and when user clicks on "start cutting" button, progress of that seekbar must start from that position. And the when user clicks on "stop cutting", seekbar must stop at that point and the duration in between start to end must show in a different color. Please help me..
I want it to look some thing like following image:
I think it will far too good to use a double thumb seekbar.Just try
https://code.google.com/p/range-seek-bar/
Since SeekBar is a subclass of the ProgressBar you can try setProgress() http://developer.android.com/reference/android/widget/ProgressBar.html#setProgress(int) method to start the initial point of the SeekBar.
There is also a secondary progress displayable on a progress bar which is useful for displaying intermediate progress, such as the buffer level during a streaming playback progress bar.
http://developer.android.com/reference/android/widget/ProgressBar.html#setSecondaryProgress(int)
Please see if that can be used for your use case...
I need to create a custom progress bar with a different style. Hopefully, I found a good example how to achieve this in this thread: Custom Drawable for ProgressBar/ProgressDialog, and it's working fine.
However, I need also to display the played time in a simple view just above the progress bar. The tricky part is that this view should move along with the progress of the progressBar and display the minutes and seconds.
To fully understand me what am I talking about, just take a look at the Vimeo player: https://jira.sakaiproject.org/secure/attachment/25159/Vimeo+player+in+Sakai.jpg. (00:22).
Could you please give me some some directions from where to start, and how this effect can be achieved?
My first idea is to get the duration of the audio file (milliseconds), and then depending of the current position, convert the milliseconds to pixels and move the View horizontally with "X" pixels.... but maybe there's a more intelligent solution.
I know this answer is late, but i saw your post today, and a bit later i found that blog entry. I think part 2 is exactly what you are looking for.
Ok, it only shows the progress in the bubble above, but I think it will guide you to the right way
I'm creating a soundboard application. Im new to developing but I have my whole app running perfectly exept for one last thing. I have it so I have multiple buttons and each button plays a different sound. I want to have a spinning progressbar on my button while the sound is playing, but then dissappear when the sound is done. How would I do this easily?
so i'm not sure how you're playing your sounds, whether its just one line of code that actually PLAYS the sound. In my opinion, you have two options
If your method returns something once the sound stops playing, I'd do something like
while (myapp.playSound() != -1){ //implement spin bar }
Or you can use AsyncTask -- http://developer.android.com/reference/android/os/AsyncTask.html
AsyncTask would probably be your best bet
Add a OnCompletionListener to the mediaplayer, so when you play the sound (or click the button) start the progress bar, and when the track is complete remove/stop it.
I want to show the progress of a media on a seekbar.
Also I want to allow user to "jump" within a medium.
I have a MediaPlayer, and a SeekBar. And as far as I see there is no an easy way to merge them.
You can use VideoView instead of MediaPlayer and you can have MediaController which can be set to VideoView.
Otherwise you have to get the progress at instances and update the seek bar you can use timers.