question

jasonbanks avatar image
jasonbanks asked

BarcodeScanner cancellation notification & overlay size

We are using the BarcodeScanner class, and having some issues.

The overlay appears to not hide the entire screen. Out activities operate in a full-screen mode, but the scanner overlay does not cover a small portion of the bottom of the screen which looks just big enough to be the Action bar. This leaves two of our own buttons exposed, which is a issue that the user can touch them while the scanner is active. Our workaround is to watch for the scanner to be "active", using the isProcessing() method of the BarcodeScanner. So while we hide our own action buttons so that they cannot be touched at start of scanning, the background thread I created first has to loop while !isProcessing() because there is a delay, then loop while isProcessing(). Finally, at the end of that loop, check whether a result was returned and set from the BroadcastWatcher.

So, is there any kind of notification we can get that the scanning activity was actually cancelled? Because this workaround is not exactly ideal. And second, is there any way to get the scanner overlay to cover the entire screen? That would alleviate the need to control visibility of our own buttons to prevent the user from touching while scanner is active.

Thank you!

Clover Android SDK
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community