Beeper suddenly not working properly any more

starchartdals

Member
Licensed User
Longtime User
:sign0085:

I have been developing an app for over a month and using the Audio library's Beeper function, but a few days ago I started having a problem with it:

I am playing an MP3 file and I make the device beep when I press a button for a bit of tactile feedback, and that has been working just fine, and the MP3 continues to play as it should. Starting sometime a few days ago, the beep seems to now be delayed (randomly), and the audio from the MP3 quits playing even though the play position indicator continues to move. I've made sure volume is up, but still no MP3 audio. Buttons do still beep, but as I said, sort of randomly delayed.

So, I went back to archived copies of my code from about 3 weeks ago, and the problem is evident there, and I KNOW it did not behave that way when I archived it. So, it seems like I may have a library problem.

My questions to the forum are:

1) Anybody else have this problem?
2) Has the library been updated recently, and I didn't realize I have a different version than before?
3) Could my library be currupt and require re-installing?

Thanks for any help in advance...
 

stevel05

Expert
Licensed User
Longtime User
Have you looked at the unfiltered logs while the app is running, there was a similar issue here that may be relevant.

Check the logs first and see if it's the same issue.
 
Upvote 0

starchartdals

Member
Licensed User
Longtime User
Thanks Stevel05,

That is not it. The beeper works every time, but the media player stops outputting sound. I'm attaching a sample app that has the problem on my system. It used to continue playing the media, but for some reason now does not. Please let me know if it stops play of the media when you hit the Beep button.
 

Attachments

  • MediaPlayerBeeperTest.zip
    10.2 KB · Views: 335
Upvote 0

stevel05

Expert
Licensed User
Longtime User
Yes works here too on my old HTC Hero.
 
Upvote 0

starchartdals

Member
Licensed User
Longtime User
Hmmm, and used to work fine here too! So, what can be the problem???

I re-installed the Audio library, and no better. Why would it suddenly just stop working on my unit? Could one of you please send me back a compiled .apk file so I can see if it is my device or my development environment?

Thanks VERY MUCH for the help!!
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
apk attached. Try this one.
 
Upvote 0

starchartdals

Member
Licensed User
Longtime User
Interesting development: I should have tried this before, but I didn't think of it till just now - I did a FULL POWER DOWN of my Kindle Fire, and restarted it, and now all is back to normal, and the beeper works fine like before.

This does cause me some concern. I saw no other issues with the Fire other than with my application. I do not know how to mitigate a problem like this with a deployed application. It has been probably a month since I rebooted.
But I can't expect users to reboot with any frequency. Is it something to do with repeatedly deploying my app to the device for testing? Any suggestions?
 
Upvote 0

starchartdals

Member
Licensed User
Longtime User
Still having trouble with Audio Library BEEPER

Back again, and have another issue with the Audio library's Beeper.

The Kindle Fire application I have been working with where I have buttons beep for tactile feedback is working great with the built-in Kindle speakers.

:BangHead:However, I have just discovered that when I plug headphones into the Kindle Fire, the music plays fine until I press a button and play the beep; the beep is heard, but the music stops and is no longer heard until I restart the application. I still hear additional button beeps each time I press one, but don't get the music back on the headphones. If I pull out the headphone plug I get music again, but still not in the headphones if I plug them back in.

This just applies to the headphone output for some strange reason. I never have the problem with the built in speakers.

So, my question is are there different audio channels for the internal speakers and headphones, like 'ph.VOLUME_MUSIC' vs 'ph.VOLUME_HEADPHONE' or something like that?

Also, Is it possible to look at the source code for the Audio Library beep function?

BTW, I did do a full power down restart of the device several times and have this issue every time.
 
Last edited:
Upvote 0

starchartdals

Member
Licensed User
Longtime User
Beeper - use VOLUME_SYSTEM channel!

Found a solution (maybe the problem):

Was using the VOLUME_NOTIFICATION channel for the beeps. I changed them to VOLUME_SYSTEM channel, and it all works fine, including the headphone output. Somebody might understand the nuances of this, but I'll just accept that it works!
 
Upvote 0

JonPM

Well-Known Member
Licensed User
Longtime User
Found a solution (maybe the problem):

Was using the VOLUME_NOTIFICATION channel for the beeps. I changed them to VOLUME_SYSTEM channel, and it all works fine, including the headphone output. Somebody might understand the nuances of this, but I'll just accept that it works!

thanks for posting, this may help others in the future

Sent from my DROIDX
 
Upvote 0

raytronixsystems

Active Member
Licensed User
Longtime User
I had a similar problem here when I wrote my first App with sound. For one reason or other, I had either turned down or muted the sound for multimedia playback. Try running another app that plays audio like YouTube,Pandora, etc. and adjust the volume to make sure it has not been turned down. You can try playing your sound file using a sound app on your phone to see if it plays properly through that. I had used the sound player that came with my phone.
 
Upvote 0
Top