cancel
Showing results for 
Search instead for 
Did you mean: 

implement a custom application that can scan QR codes using SAP mobile start

08-19-2024 6:16 AM
2815 views 5 comments
0 Likes
SAP Managed Tags
Labels
Business Application StudioJavaScriptmobile scannerQRQR CodesSAP Mobile StartSAP UI5
Subscribe

Hi all,

In the Business Application Studio, I want to implement a custom sapui5 application that can scan QR codes with my mobile phone using SAP Mobile start. The application should be integrated into the Fiori Launchpad and work for both iOS and Android. It is important that not only simple barcodes are supported - QR codes are mandatory for my purposes. I would appreciate helpful links, instructions or step-by-step guides...

 

Thanks....

0 Likes

Accepted Solutions (0)

Answers (2)

Answers (2)

akik
Discoverer
0 Likes

akik_0-1757333346210.png


in the fiori launchpad update the security header. after a lot of tries, I was able to fix it.

dennis_koehler
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi @priyankadegaonkar , 

I might be able to provide a bit of guidance, but note that I'm not a developer and this is not quite my area of expertise. 

Three years ago I released this blog on creating an App to scan barcodes via Joule Work mobile app for iOS. It might be outdated but in general concepts should stay the same and you could try to follow it.
Basically you need to deploy your app into the HTML5 repository of an SAP BTP subaccount that runs your SAP Build Work Zone, standard edition instance with your Cloud Fiori Launchpad. To this you will be able to connect SAP Mobile Start and use your app. 

With the SAP Mobile Start, the standard SAPUI5 barcode scanning component was not functioning on mobile devices outside the Fiori Client. So in the blog I used another js-library for the scanning part. With current UI5 versions though you should be able to leverage the ndc.barcodescanner component of SAPUI5. 
Based on the linked note it's build upon zxing-js library that should support your usecase of QR Code scanning.

Hope that's helpful!
Best regards, 
Dennis

0 Likes
Hi, Thank you.. I'll try it out and see if it works for me...

Hi @dennis_koehler .. In local run on BAS and after Deployed in Cloud foundry It worked, open the camera, but don't open it in after configured to FLP tile means SAP Build Work Zone.... I'm getting error like this........... BarcodeScanner.loadZXingCPPInstance: can not load wasm lib instance of ZXingCPP. RuntimeError: Aborted(CompileError: WebAssembly.instantiate(): Refused to compile or instantiate WebAssembly module because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src * data: blob:"). Build with -sASSERTIONS for more info.