01-31-2017 1:29 PM - edited 02-03-2024 7:35 PM
Hi,
I have created a SAPUI5 app for bar code scanner using cordova plugin.
When I deploy it on FIORI Launchpad and try to run the app. then the camera opens to read the bar code but it does not gives the result of the scanned code.
Any help please?
Following are the screen shots of my code (on Eclipse)
Index:
View:
Controller:
Here are the screen shots of the app. on the FIORI Launchpad.
After opening the camera, it looks for the bar code but does not transfers this data back to the screen.
Is there something that I am missing?
Any help would be highly appreciated.
Regards,
Firoz.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you succeed?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Based on the camera screenshot that you have shared it looks like you are not focusing closely on the barcode for which you intend to scan. At a minimum you likely need more focus on the barcode image than is currently shown from the screen catpure. It is hard to see from the image but you may also need to enlarge the barcode print out so the camera can properly distinguish the width of the bars/spaces and decode the information properly. You would also generally be more successful to run this on a newer mobile device with a better camera than the webcam that you are using in HAT.
Regards,
Ryan Crosby
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
here is my controller code
onButtonPressed:function(){
jQuery.sap.require("sap.ndc.BarcodeScanner");
sap.ndc.BarcodeScanner.scan(
function (mResult) {
alert("We got a bar code\n" +
"Result: " + mResult.text + "\n" +
"Format: " + mResult.format + "\n" +
"Cancelled: " + mResult.cancelled);
},
function (Error) {
alert("Scanning failed: " + Error);
},
function (mParams) {
alert("Value entered: " + mParams.newValue);
}
);
}
And I also have a question , I use the SAP WEB IDE to create my project , in my project I use the HAT and cordova , I try to run my APP in Web application and Android device can achieve effect , turn on the camera and read the result , but when I deploy it to my fiori lanuchpad , I will recive a tips to tell me my device camera is unavailable , I guess it's the cordova and HAT environment got wrong , but I don't know how to put the cordova in the SAP fiori launchpad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.