Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

New Developer
Posts: 31
Registered: ‎06-13-2014
My Device: Z30
My Carrier: Telus

Re-activating BarcodeDetectorVisuals

[ Edited ]

I am having trouble restarting the BarcodeDetectorVisuals after the camera has been closed and then re-opened.

The visuals show perfectly the first time the camera is opened, and the BarcodeDetectorVisuals::detected signal is fired on detection. After the camera is closed and reopened the visuals do not display and the detected signal is not fired, although the BarcodeDetector::detected signal is fire, so the detection is working.

I have tried resetting the BarcodeDetectorVisuals::barccodeDetector property, but that doesn't work.


Does anybody have any ideas? Is there some way to reset or reactivate the BarcodeDetectorVisuals object?

Posts: 749
Registered: ‎12-16-2008
My Device: BlackBerry Z30
My Carrier: Bell

Re: Re-activating BarcodeDetectorVisuals

This is a known bug, unfortunately. If you destroy the BarcodeDetectorVisual and create a new one it should work, and that will be fine for single shot barcode scanning but it won't really look right if you are trying to do continuous scanning. In that case all you can really do is roll your own.


Or? Not worry about it. The targetting area is actually huge. You can put a 1D code in pretty much any part of the viewfinder and have it work, it doesn't need to be dead center at a certain size. Just in focus.

Paul Bernhardt
Application Development Consultant

Did this answer your question? Please accept this post as the solution.
Found a bug? Report it to the Developer Issue Tracker