I need some help in the concept of Services in Android? Actually i want to Play some sounds with animation in Android. I'm done with frame by frame animation successfully but want to play some audio with animation. I got some ideas about Services from google but I'm unable to get their point, so that i am posting it over here. If anyone has any idea about how can i do this please give me some suggestion to do this. It would be very helpful to me.
Have a nice day ahead...
Thank you!!
You'd need to take a look at,
MediaPlayer
I think the documentation given is self-explanatory. Also you need not make use of a separate Service for playing the sounds, unless of course you have a special need.
Related
I use Exoplayer 2.8 to show HLS videos in my app.
For fix time contents seekbar works perfectly, but its useless for live content.
I want to show seekbar for past 12 hours and use it for timeshift, how can I do that?
Update: seems like there is already existing solutions:
https://github.com/google/ExoPlayer/issues/87
https://github.com/jglanfield/ExoPlayer/tree/jdg-hls-rewind
You should take a look at TimeLine object and use it depending on you seekbar update logic.
Simple approach would be to store start time on your own in the code and then update it as frequent as you want with increasing playback and buffer.
More helpful answer would be if you would post some code that you already have, so anyone can guide you towards solution that will work for you.
I'm looking into creating an android app and wanted to make something that could show what people around the user are listening to. Is there any way to do this? I've been looking at the Spotify SDK and it dosen't appear to be possible, but I wanted to confirm.
Sarah Markers,
To identify the music being played around you, I would suggest you to read this article http://www.royvanrijn.com/blog/2010/06/creating-shazam-in-java/ .
I could not find anything on Spotify SDK which can help you with determining the music.
I need to play sound effects in my game such as jump, failed, shot etc.
So for this purpose I have selected SoundPool class. But there were some times when it lagged.
So I wonder what is correct way to use this class. I have tried to use play method in new thread, it seems work better but I don't know if I am correct.
Please advice how to use object of this class correctly for better performance.
Best way to implement Sound / Music into your game is by using Service component. Read this answer here for an example.
I am realizing my own media player am using ffmpeg for decoding and libjnigraphics(Bitmap,SurfaceView,...) for rendering.
I got it working now i want to get an attractive UI i want to display play/pause/stop/next buttons in the bottom of my screen with circular buttons etc like in the actual video players available in the market and in the following picture
How a similar UI is realized in android ?
I searched a lot over the net but i didn't find anything interesting
I would be thankfull if someone gives me tips about making similar UI
If I understand what you're trying to do you should take a look at this answer here:
Android: How to create video player?
by Commonsware and also to his sample application Vidtry.
Hope this helps. :)
I want to create an audio recorder I have tried the code I get from http://developer.android.com/guide/topics/media/audio-capture.html and it works fine; it records and it plays back what I have said. But right now I want to create an audio recorder with a UI like in recognizerIntent which Google has provided so that you can see or monitor that your voice has been recorded(sorry I can't find a right term but I'm hoping you can understand what I am trying to say). Do you know any tutorial or links that can help me?thanks for you help!
I think you mean that you want some feedback that your voice is being picked up? If so, perhaps this project, Audalyzer might be a good place to start looking?
Libraries within the package offer you a dB reading, a one and two-dimensional wave form, and an FFT plot.
(source: googlecode.com)
There is a simpler WaveformControl you may find easier to understand and modify for your needs.