question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BeepManager plays two beeps sometimes

See original GitHub issue

I create a customized continuous capture activity and am using the beep manager to play a sound when a new barcode is scanned. However, sometimes the beep manager plays the beep sound more than once even though it gets called only once.

Here is what I have in my BarcodeCallback.barcodeResult function:

if(Config.getInstance().addBarCode(result.getText())) {  //synchronized method!
    Log.i("MjMTest", "Played sound for: " + result.getText());
    beepManager.playBeepSoundAndVibrate();
}

As seen, the barcode is added to a config instance. This adds it to a synchronized list to make sure it doesn’t get added more than once if it has already scanned. It then prints to the log that it has played a sound for X barcode, then plays the sound. In my logs, I will only get the output for the log printed once, but the beep sound will still play twice. The two beeps usually happen on the first barcode I can, but sometimes happen on other barcodes after the first scan as well.

Is there anything I am missing? Or is the beep manager a bit buggy like this sometimes? Thanks for any help

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Bajranghudda1commented, Apr 12, 2016

@mjmfighter can you reproduce it?? I am also using BeepManager but i didn’t see any problem, there might be your barcode scanned two times frequently, you can have a check if barcode scanned first time then stop immediately scanning.

0reactions
rkistnercommented, Oct 16, 2016

This should be fixed with #221 now - thanks @roxma.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Double beep from speakers - Microsoft Community
Hi, my notebook plays strange double beeps and sometimes repeats it continuously for a few minutes...could it be due to a RAM error?...
Read more >
Sometimes the headphones will have a two-beep sou - Best Buy
Sometimes the headphones will have a two-beep sound that plays, this is the same sound th – Learn about Insignia™ - Wireless Over-the-Ear ......
Read more >
How to play a short beep to Android Phone's loudspeaker ...
I recommend you use the ToneGenerator class. It requires no audio files, no media player, and you can customize the beep's volume, ...
Read more >
Odd beeping when typing in message app - AppleVis
Sometimes it just plays the normal click sound, but most of the time it ... as when you try to raise the volume...
Read more >
8 Ways to Fix Random Beeping and Stuttering on Windows 11
Is your Windows 11 PC beeping and lagging occasionally? ... As a result, Windows may play those connect/disconnect sounds repeatedly.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found