cancel
Showing results for 
Search instead for 
Did you mean: 

Feature Barcodescanner "Scan now" button?

PaulBuettner
Participant
0 Kudos

Hello SCN-Community,

we are using SAP Standard Fiori client for iOS. Barcode scanning itself works fine.

But unfortunately the used barcode scanner scans the very (bar)code which comes near to the center of the scanning area.

In case of logistics applications most use cases are based on shipping or handling unit labels which contain several different barcodes.

It's nearly impossible to really scan the desired one on first try. Therefore I searched for a way to add an "Scan now" button on scan screen - but I didn't find any.

The Fiori Client release notes http://help.sap.com/fiori-client in area Development Information > Kapsel and Cordova Plugins for SAP Fiori Client > Barcode Scanner Plugin

http://help.sap.com/saphelp_smp3013sdkmfadev/helpdata/en/05/c4b6e12e3443609d7ed9c25b8feb6d/content.h...

name SAP is using an fork of Wildabeast's barcode scanner.

https://github.com/phonegap/phonegap-plugin-barcodescanner

which is now known as phonegap barcode scanner:

https://github.com/phonegap/phonegap-plugin-barcodescanner/blob/master/README.md

I think I can't be the only one who encounters such a problem?

Is here anyone else who desires this function?

Maybe we can trigger some kind of feature request to SAP to add such a function?

BR,

Paul

P.S.: is there a better way to place a request than opening an OSS call?

Accepted Solutions (0)

Answers (1)

Answers (1)

Ryan-Crosby
Active Contributor
0 Kudos

Hi Paul,

I was able to work out an example for this as long as you use the alternate overlay screen just for fun.  The other overlay with the ugly green reticle and red line is all done programmatically and would require a greater number of changes to make it happen.  I have based it on a custom version of the current cordova-plugin-barcodescanner plugin because I found crashing issues with the ios version as well as some other older inherited issues from the earlier versions.  I did not adjust it to allow for auto vs. manual capture trigger in the JavaScript call but if that is preferred I could adjust it to handle that capability pretty easily.

The one requirement is you have to remove the kapsel plugin from the Fiori Client and add the custom plugin in it's place.  We don't have this manual scan trigger requirement but I have played with the plugin some because of the other issues as well as adding a speech recognition plugin.

Regards,

Ryan Crosby

PaulBuettner
Participant
0 Kudos

Hi Ryan,

thanks for your answer. I feared only a custom client could solve this - until now we had the fixed constraint to use the standard client. Maybe we should discuss this again.


Yes - we use the ugly green rectangle at the momemt 🙂  But more annoying are the issues to scan the right barcode at first try. Until now we had no crashes but some huge memory consumption due repeated scanning.



Regards,

Paul

Ryan-Crosby
Active Contributor
0 Kudos

Hi Paul,

Yes, unless SAP chooses to incorporate some of those type of requests a custom client is your only option.  You can only use the other overlay with a custom client too because the .xib file is not setup for use by default.

As far as crashing I experienced crashes every few scans on my iPhone 4S when I would accidentally double tap the button for scanning in the UI5 application because the camera would lose view access to the pop-up help from that comes from the bottom.  I no longer have a smartphone but on my iPod Touch 6 I could still get it to crash every 20-30 scans when I ended up doing a double tap of the UI5 button for scanning.  Even in some cases it would happen with single press because the scan event would get fired more than once which would end up in a case where threads would get orphaned.

Let me know if you want to revisit and I can share my code version.  One of the other adjustments is to also allow high quality capture instead of the default medium capture so you can scan better at little images and longer distances.  From what I know one of my teammates is in talks with SAP to get them to incorporate some of the stuff potentially in SP13 but that wouldn't include a "Scan Now" button.

Regards,

Ryan Crosby

PaulBuettner
Participant
0 Kudos

Hi Ryan,

sorry for the long delay - I had some days off 🙂

We first have to discuss our strategy regarding customer compiled client. If we can use it, I will come back to you for sure 🙂

Double trigger issue I had to, at the moment I prevent this with a lock mechanism in JavaScript. I set the view's busy indicator and don't handle any further access to barcode as long as this is set.

Regards,

Paul

Ryan-Crosby
Active Contributor
0 Kudos

Hi Paul,

I tried that approach initially too but ended up in situations occasionally where the callback never executed so the screen would stay in a busy state for the UI5 application.  The user would then have to close down the whole client and re-launch it in order to continue on so that's why I worked on the iOS plugin side instead.

Just let me know and I will provide you with a sample that should do what you need.

Regards,

Ryan Crosby