Hi, all!
What I’m trying to do:
I have tested two QR/Barcode scanner examples discussed in the forum. Both work on the method of using the camera to take a picture and then upload it to the server to be decoded. I prefer a quicker way of decoding, and have found a QR scanner by JS code:
Access Camera and Read QR code using JavaScript - Bing video
Following the example in the video I created a custom HTML page and added the following:
.result{ background-color: green; color:#fff; padding:20px; } .row{ display:flex; }SCAN RESULT
And it works! The camera captures the QR code and returns the code by the JS alert.
What I’ve tried and what’s not working:
- I have two questions:
See the line in the html snippet above? It is required for the JS function to use. Now in the UI design, how do I add it so that it can appear as an element in the translated html?
- I would like to have the JS function call rewritten in Py, so that I can have a method return the scanned content to use in subsequent code. I have looked at the Quill example a few times but still have not understood it. hope someone can point the direction to me.
Code Sample:
# this is a formatted code snippet.
# paste your code between ```
Clone link:
share a copy of your app
In the app the page “QrScannerHtml5” is the custom HTML.
Thank you in advance for the guidance.
P. Redjo