cancel
Showing results for 
Search instead for 
Did you mean: 

QR code reader in SAPUI5 app

former_member645858
Discoverer
0 Kudos
850

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.

View Entire Topic
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.