Support Request: Read from scanner

Description

We must be able to read a QR code and execute the URL which is encoded in it.
In the old SiteKiosk Client it was possible to create a custom HTML page and load this.

In the SiteKiosk online this is not possible.
The code looks like the following:

....

<!-- SiteKios Custom code -->
        <script>
            new Function(_siteKiosk.getSiteKioskObjectModelCode())();
        </script>
        <script>
            var callbackFunc = function (data, deviceName) {
                document.getElementById("text").insertAdjacentHTML("afterend", "<h3>" + deviceName + "<\h3> - <span>" + data + " - <\span>");
                document.getElementById("url-link").value = data;
                executeUrl();
            };

            function GetDevices() {
                var devices = siteKiosk.devices.getAll();
                document.getElementById("devices").innerHTML = JSON.stringify(devices);
            }

            function registerDevice() {
                var deviceName = document.getElementById("devicename").value;

                if (deviceName == "") return (document.getElementById("foundDevice").innerHTML = "No device found!");

                var device = siteKiosk.devices.getByName(deviceName);

                if (device == null) return (document.getElementById("foundDevice").innerHTML = "No device found!");

                device.valueChanged(callbackFunc);

                return (document.getElementById("foundDevice").innerHTML = "Registered device: " + JSON.stringify(device));
            }

            function executeUrl() {
                document.getElementById("text").insertAdjacentHTML("afterend", "<h3>URL Link<\h3> - <span>" + document.getElementById("url-link").value + " - <\span>");
                window.location.href = document.getElementById("url-link").value;
            }
        </script>

....

<div class="container">
                    <div class="i-am-grid">
                        <div class="i-am-box" style="width: 300px; height: 250px;">
                            <h3>induction training</h3>
                            <label>Please scan your <span class="text-orange">QR code.</span></label>

                            <!-- SiteKiosk HTML code -->
                            <div id="border-width" hidden="hidden">
                                <div id="medium">
                                    <div>
                                        Available devices:
                                        <span id="devices"></span>
                                    </div>
                                    <br />
                                    <div>
                                        Listen to input from this device that has been configured in SiteKiosk:
                                        <br />
                                        <input id="devicename" tpye="text" value="scanner" />
                                        (state the device name)
                                        <br />
                                        <input id="deviceid" tpye="text" value="514529795" />
                                        (state the device ID)
                                        <br />
                                        <button onclick="registerDevice()">Register the listener</button>
                                        <br />
                                        <br />
                                        <input name="url-link" id="url-link" tpye="text" style="width: 80%;" readonly="" />
                                    </div>
                                    <br />

                                    <span id="foundDevice"></span>
                                    <div>
                                        Data that has been received:
                                        <span id="text"></span>
                                    </div>
                                </div>
                            </div>
                            <!-- END SiteKiosk code -->
                        </div>
                    </div>
                </div>
...


How can we scan a QR code and let SiteKiosk jump to the URL which is embedded in the code.

Answer: (3)

Re: Read from scanner 1/15/2024 2:51 PM
Hello,

This seems to be a special code customization for SiteKiosk Classic Windows.
However, the SiteKiosk Object Model of SiteKiosk Classic Windows no longer works in SiteKiosk Online.

But this entry describes how you can generate a QR code from the web page displayed in SiteKiosk Online using a script.
https://devblog.provisio.com/post/2022/10/27/Generate-a-QR-code-from-the-web-page-displayed-in-the-browser.aspx


Please understand that our free support cannot offer any assistance with creating your own code apart from the detailed SiteKiosk Online and SiteKiosk Online API documentation
https://www.sitekiosk.com/eu/sitekiosk-documentation/

If you need further assistance in creating individual coding solutions you can contact us via e-mail that we may find a solution against payment for your needs.
Contact: https://www.sitekiosk.com/eu/contact/

Regards,
Michael Olbrich
Re: Read from scanner 1/15/2024 3:34 PM
We do not need to create a QR code.
We must be able to read a QR code and than SiteKiosk Online must browse to that URL which is encoded in the QR code.
Re: Read from scanner 1/15/2024 3:36 PM
Hello,

In that case please write a detailed description to support-europe(at)provisio.com that we can check the technical feasibility and the amount of work to make a quotation.

Regards,
Michael Olbrich
My Account
Login
Language (Tickets):