[Barcode Scanner Plugin] How should Canceled scans be handled

Forge Component
Published on 2018-11-14 by leonardo.fernandes
8 votes
Published on 2018-11-14 by leonardo.fernandes

I see that the "Deprecated_ScanBarcode" action has a "Cancelled" output parameter. How should we handle cancelled scans in the new version?

When I try to scan again I see a "Scan already in progress" error.

Hi Mikael, sorry for the delay in replying to you.

I think you have a point, maybe I forgot to include such an API when I refactored this plugin. I'm going to make sure that a new version has a non-deprecated way of checking if a scan has been cancelled.

For now, you can still use the deprecated API, or you can check if the text returned by the ScanBarcode action is empty. You can see an example in the sample mobile application.

Hi Mikael, have a look at the latest version of the plugin, which now exposes a boolean true when the user cancels the scan.

Great, thanks.