play music infinitely until a button is clicked [closed] - android

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I'm just trying to play music continuously in an infinite loop until a button is clicked.it works fine but,say for eg: my sound file is 5 sec. after every 5 sec there is a pause and the music plays again.Is there anyway to prevent that and play the music without interruption?
I have used Setlooping(true) for that infinite loop.

Your problem is that your music file likely contains a short pause at the end (or the beginning). You will need to edit this file in a sound editor to make it more suitable for continuous playback.
EDIT
To be clear, are you looking to loop one specific sound file, or any sound file in general?

Related

How to download audio files one by one and show progress [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I am developing such application in which there is a switch , once the user turn on the switch all the audio files in the list should be download one by one and progress will be shown besides the name of audio file, i am facing the problem to show the particular progress, and once the user turn off the switch the download should be stop, Please help...as shown in picture the progress will be shown besides particular downloading file
There is a beautiful library. it has a lot more features like serial/parallel downloading. but you have to create custom logic and animation according to your screen

Music Player how to make the UI [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I am surely able to run the music on my music player. But how am i really supposed to create a UI? I want a kind of UI for the music player in which there will be a pause, a start, and other basic buttons along with a proceeding bar as the music progresses.
Just use the MediaPlayer class.
Then Add ImageButtons for the player action (play , pause etc...)
Here is a good place for free icons
https://material.io/icons/

Will Music apps like Saavn be on background or foreground when they are playing in Notification Bar? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I wanted to know whether music apps when they are playing in Notification Bar, is the app running in background or foreground.
I've recently built an Android music player app which played music on background. I this is the case for all music player apps. You can refer to this tutorial if you need any assistance
First part: http://code.tutsplus.com/tutorials/create-a-music-player-on-android-project-setup--mobile-22764
Second part: http://code.tutsplus.com/tutorials/create-a-music-player-on-android-song-playback--mobile-22778
Third part: http://code.tutsplus.com/tutorials/create-a-music-player-on-android-user-controls--mobile-22787

Reuse looping mediaplayer in android [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
how can i properly reuse a MediaPlayer in android which is also be looping? (should be initialize as MediaPlayer.setDataSource in the raw folder so that i can use prepareAsync())
If you want to reuse a MediaPlayer, according to the lifecycle documentation, you should stop() the player, prepare it again with new data, then start it again. I believe the same OnPreparedListener previously set will be invoked again, but you could also reset it before preparing.
Once you call release(), the MediaPlayer is no longer usable, so you should only do that when you are completely finished and need it to release resources.

How to draw waveform of Android's music player? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
one of the default live wallpapers that came with my phone was a wallpaper that displayed the wave form of music playing in the background in real time. I was wondering how one could go about doing this. It seems I should somehow access the streaming data of the background music and compute the samples in real time, but I have no idea how to get the streaming data. I think I can display the wave form by following this tutorial http://codeidol.com/java/swing/Audio/Build-an-Audio-Waveform-Display/, but I'm not exactly sure how to do it. Help would be greatly appreciated/
There is an Android class called Visualizer that lets you access audio being played
http://developer.android.com/reference/android/media/audiofx/Visualizer.html
In addition, since Android is all open source, you can look at how the live wallpaper does it!
https://android.googlesource.com/platform/packages/wallpapers/MusicVisualization/

Categories

Resources