Reputation: 91
I am developing an App that plays back audio, using media player. The Problem is the response time from when the headphone are removed to the time the audio playback is paused. The same problem can be found in RandomMusicPlayer I have followed instructions from Handling the AUDIO_BECOMING_NOISY Intent from android website. I thank you for any help you provide. Peace.
Upvotes: 0
Views: 536
Reputation: 91
Thank You ssuukk, for your response. Between development and other obligations have delayed my response. I now have time to post the solution to my problem.
My audio track is a voice track oppose to music, and I was getting about three to four word out after removing the headphones. I implemented Handling the AUDIO_BECOMING_NOISY Intent from android website and RandomMusicPlayer, and the RandomMusicPlayer has the same problem. I did suspect, not implementing as an inner class and the need for a second intent was the problem.
I found my solution here
Peace.
Upvotes: 1
Reputation: 8410
You need to be more specific. I'm using AUDIO_BECOMING_NOISY in my application and it never was any lag between removing headphones and pausing, nor a single complaint from an user that player is pausing too late. So the problem must be somewhere in your code.
Upvotes: 0