|
Post by charlyr on May 13, 2019 19:49:16 GMT
Hi, i am trying to scan QR codes using the [barcode] extension. The Zebra EMDK 4.2 is already installed. The app runs ok on my Android device but it scans every barcode type.
To avoid it, i use the properties available but it seems that the API is bypassing them.
def scanqr @@element = @params['element'] scanner = Rho::Barcode.getDefault() #Filter scan codes scanner.allDecoders = false
scanner.qrCode = true
height = (Rho::System.screenHeight * 0.90).to_i() width = (Rho::System.screenWidth * 0.90).to_i() if width < height height = width else width = height end top = ((Rho::System.screenHeight - height) / 2).to_i() left = ((Rho::System.screenWidth - width) / 2).to_i() scanner.viewfinderX = top scanner.viewfinderY = left scanner.viewfinderWidth = width scanner.viewfinderHeight = height scanner.take({}, url_for(:action => :scanReceivedCallback)) end def scanReceivedCallback qrcode="" if @params["status"] == "ok" qrcode = @params["barcode"] Rho::Log.info("scanQrCallback('" + @@element + "','" + qrcode + "')", "APP QR") else Rho::Log.info("Scan cancelled", "APP QR") end Rho::WebView.executeJavascript("scanQrCallback('" + @@element + "','" + qrcode + "')") end
|
|
|
Post by Alex Epifanov on May 14, 2019 22:22:02 GMT
Are you using Zebra/Symbol device?
|
|
|
Post by charlyr on May 15, 2019 18:17:24 GMT
No. It´s an Android Phone, using the rear camera as qr scanner (Samsung J7), the app must also run on iPhone devices.
Thanks in advance
|
|
|
Post by Alex Epifanov on May 15, 2019 22:41:38 GMT
Symbology settings in the API are working for EMDK-based Zebra devices. Consumer devices use third-party software barcode-recognition libraries with default settings so switching symbologies may not work for them. Our team may look and research if we can enable those settings for software scanner. This work can be done on paid basis.
|
|
|
Post by mr on Mar 27, 2023 12:56:49 GMT
What could be the reason when it is not working on a Zebra TC51. Apps is running in a "Web App Container". All specific barcode extension settings seems to be ignored. Thanks
|
|
|
Post by mr on Mar 28, 2023 7:49:23 GMT
More information: Device: Zebra TC52X Rho: 7.5 EMDK: 7.6.10
Trying to only enable QR with: Rho.Barcode.allDecoders = false Rho.Barcode.qrCode = true
But all barcodes will be read.
Same web app is working as expected in Zebra Enterprise Browser with: EB.Barcode.allDecoders = false EB.Barcode.qrCode = true
|
|
|
Post by Alex Epifanov on Mar 30, 2023 12:57:18 GMT
No idea yet. Can you share your app project and run log?
|
|
|
Post by mr on Apr 3, 2023 6:34:44 GMT
Okay. I can reproduce it with a simple app with rhoconfig.txt start_path='http://internal.domain/test.html' test.html: <!DOCTYPE html> <head> <script src="/assets/scripts/rhoapi-modules-7.5.0.js"></script> <script type="text/javascript"> Rho.Barcode.allDecoders = false Rho.Barcode.qrCode = true; Rho.Barcode.enable({}, function(data) {}); </script> </head> <body> </body> </html> Log: controlc.com/b0aff519Thanks
|
|