cancel
Showing results for 
Search instead for 
Did you mean: 

QR code reader in SAPUI5 app

former_member645858
Discoverer
0 Kudos
820

I want to implement a SAPUI5 web application in SAP Web IDE that can scann OR codes with the phone camera. I've tried using some JavaScript libraries like WebCodeCamJS, jsQR, but none of them worked for me (I mean that even the camera does not recognize the QR code or the camera does not open). I also tried with the sap.ndc.BarcodeScanner which works from Fiori Client, but it's not a reliable solution for me. I also read about Cordova plugin, but my app is web, not mobile.

Have anyone any idea how could I achieve that? Any solution is welcome. Thanks.

Accepted Solutions (0)

Answers (2)

Answers (2)

nabheetscn
Active Contributor
0 Kudos

Hello Diana Sandu

You can use the features of the HTML api. Infact you can use Quagga integrated with in your SAPUI5 application. Read this blog for more details.

PS: I would request you to a google search you will N number of options available.

Thanks

Nabheet

former_member645858
Discoverer
0 Kudos

Hello.

There are N number of options and I've tried N+1, but none of them helped me :). About Quagga: it reads barcode, not QR.

Thank you!

nabheetscn
Active Contributor
0 Kudos

🙂 so what all you have tried better mention it or else you will end up getting suggestion which you have already tried:) Shall we assume you have tried the most commonly used this stuff? What issue did you face with jsQR?

vinita_kasliwal
Active Contributor
0 Kudos

Hey Diana

Try to refer to the links as below

https://blogs.sap.com/2017/10/27/barcode-or-qr-code-scanning-functionality-into-sapui5-applications.... https://sapui5.hana.ondemand.com/#/api/sap.ndc.BarcodeScanner/methods/Summary

There is code in there for getstatusmodel and where you could get the scanned values. Note that this may not be device specific and should ideally work on both web and mobile being Fiori component Let me know if that helps

Regards

Vinita

former_member645858
Discoverer
0 Kudos

Thank you, Vinita.

sap.ndc.BarcodeScanner works from Fiori Client app. That's not what I want. I want my app to run from a web browser like Safari for iOS and Google Chrome for Android devices.