cancel
Showing results for 
Search instead for 
Did you mean: 

Use sap.ndc.BarcodeScanner in browser without Fiori client

florian19982
Explorer
356

Dear fellow Sappies,

I am unsing the sap.ndc.BarcodeScanner in my application.

In my view I have:

<Button icon="sap-icon://bar-code" press="scanBarcode"/>
<Label id="label" text="Null"/>

scanBarcode looks like this:

scanBarcode: function(oEvent) {
    sap.ndc.BarcodeScanner.scan(
        var that = this;
        function (mResult) {
             if (!mResult.cancelled) {
                 var code = mResult.text;
                 that.byId("label").setText(code);
             }
        },
        function (Error) {
            if (Error !== undefined) {
                MessageBox.error(Error.message);
            }
        }
    );
}

My problem is that I do not want to use the Fiori client to access the application.

Therefore, it should be possible to use the barcode scanner in a browser using the device's camera.

Is it possible to do that?

Thank you for your help!

Ondřej_Nekvinda
Participant
0 Kudos

Hi,

have you find any solution?

Accepted Solutions (0)

Answers (0)