|
Post by jontara on Jun 30, 2021 20:15:42 GMT
Am I correct in thinking that there is no way to alter the appearance of the barcode capture with internal camera on iOS and Android?
The layout doesn't work well with current iOS devices, because of the curved edges of newer phones (iOS at least), such that there are phantom pixels that are off of the physical screen in the corners which cannot be seen.
The OK and Cancel buttons in lower left/right corners are difficult to operate, and partially off the physical screen.
As well, the display of the barcode text at the bottom is not always desirable.
Finally, it would be great if it were configurable to only take up some part of the screen, so that regular UI is visible for the rest of the screen.
I can undertake to make some changes myself, and happy to contribute back, but want to make sure that I am not missing something!
|
|
|
Post by Alex Epifanov on Jul 1, 2021 9:46:13 GMT
Jon, are you using ZXing, or native engine to scan barcodes? In recent versions we are using native iOS/Android APIs to scan barcodes. ( configured with android/barcode_engine and iphone/barcode_engine settings in build.yml ) Not sure if iOS native view is customizable, but Dmitry Soldatenkov should know best.
|
|
|
Post by jontara on Jul 3, 2021 21:05:36 GMT
I did not set a barcode engine. I see from comments in build.yml that iOS should default to APPLE_BARCODE_ENGINE. And I think some time ago I may have traced or some other way noticed it was using the native engine. Very happy with it on iOS, as it works fantastically well. Precise aim is not needed for QR (barcode a bit fiddly, but that is the nature of barcode).
On Android, I have not tried recently, but I will shortly. I recall that the capture was not as easy on Android, but I think at the time I last used barcode perhaps you had not yet added native support on Android. So, I think ZXing, I note I had to go get EMDK Extensions from Zebra and install in the Android tools.
So now I am building on the latest edge from master, I will see what gets built for Android and see if OK if I don't install EMDK. (New computer, so it won't be there in my Android setup anyway.)
BTW, did you get email I sent? I got a bounce on some temporary technical problem. I don't know if my email provider re-sent, I didn't get another bounce.
Tau Extensions are open source, but not on GitHub? If I can get source, it would be easier to customize the native view, and perhaps provide something back that will enhance the product. My goal is to have it not take the entire page, so that other information can be shown while scanning, and perhaps put the OK/Cancel in regular UI. Most scanning, a more square view area would be appropriate, though I can see for barcode (not QR) full screen holding the device sideways makes the most sense.
Awaiting any feedback from Dmitry, thanks!
|
|
|
Post by Dmitry Soldatenkov on Jul 4, 2021 23:22:23 GMT
|
|
|
Post by jontara on Jul 6, 2021 0:07:12 GMT
Thank you, Dmitry!
I don't know why I thought I needed Tau Extensions. I was building with Tau Extensions Gem installed, but I guess it was not being used.
I see now in iOS BarcodeViewController.m, the view is just always opened with fixed dimensions of 320 x 460!
So, for now, I can pull this code out of the repo and make my own barcode extension, and either just change to my desired dimension, or implement reading viewFinderHeight (and rasterHeight?)
BTW, I see getSupportedProperties() doesn't return anything. But I do get getAllProperties() and see I can set rasterHeight successfully, but of course it is ignored.
Looks like similar for Android, as I see:
private int mRequestedPreviewWidth = 1024*2; private int mRequestedPreviewHeight = 768*2;
P.S. With Tau Extensions, though, I could support external Zebra hardware? That might be good for my application, because Zebra hardware might be good for a kiosk usage for quick walk-through, with people self-scanning at a kiosk, rather than a person with device having to scan presented documents.
|
|
|
Post by Alex Epifanov on Jul 7, 2021 13:50:17 GMT
jontara, only difference in Tau Extensions barcode vs usual Barcode is just support for older Motorola SDK needed for some legacy devices. You don't need extensions to use hardware scanner, it supports EMDK out of the box. ( not sure if it would support kiosk scanners out of the box, but we can upgrade it to do so of course ).
|
|
|
Post by jontara on Jul 9, 2021 2:52:43 GMT
Thank you, Alex, I had some misunderstanding, and you've cleared it up.
When I say "kiosk", I just mean like some tablet installed in some cabinetry as a kiosk, and with an external scanner mounted so that people can either present some document or documents to be scanned, place on a tray like many airport ID scanners, etc.
So, just the ability to use current Zebra external devices that might be suitable for that type of setup.
Seems like everything needed is built-in, and only some ability to change the capture window size for standalone use with device camera. I see that the ability to change capture window exists for external scanners, right?
|
|
|
Post by Alex Epifanov on Jul 9, 2021 15:17:28 GMT
( if I get you right )I don't remember that we have an ability to customize the viewfinder for external scanner, we just use what system provides. For Android software scanner we have a layout in resources but no API to customize it for user, you would need to change the platform internals for that.
|
|
|
Post by jontara on Jul 28, 2021 22:53:53 GMT
I have started to make some changes for my needs. I've started though just by making hard-coded changes, and the locations where I make the changes will guide me later in making proper changes that can be controlled by SDK properties. I'm doing this in public, so anyone can follow along at github.com/watusi/rhodes/tree/watusi-1-barcodeI should point out that the barcode UI for iOS currently does not meet Apple Human Interface Guidelines, because it does not obey "safe area" on newer devices that have rounded screen corners and control bar. As well, because the buttons are outside of the safe area, they can be difficult to activate. I haven't addressed that issue yet.
|
|