[Barcode Plugin] Box camera overlay.

Forge Component
(10)
Published on 2018-10-31 by OutSystems R&D
10 votes
Published on 2018-10-31 by OutSystems R&D

Is there a good way to add an overlay to the camera? I'd love to be able to set up a box similar to the one on the screenshot. Can anybody advise? 

РезÑ?лÑ?Ñ?аÑ? поÑ?Ñ?кÑ? зобÑ?аженÑ? за запиÑ?ом "cordova camera overlay"

Hi Roman, 

You will need to edit the plugin itself to add the box overlay and wrap the plugin back into outsystems. 

The repository maintained by outsystems is found here

The files that need changing are cszbarscanner.xml for android and, as far as i'm aware, cszbar.m (at around line 100) for ios. 

As long as nothing else is changed then you can just clone the original barcode plugin espace and change the repository reference to your own.

Hope this helps,

Adam

Hi Adam, 

Thanks for your reply. Would it require a rebuild? Can you recommend a rapid way of working with the layout? I don't feel like it'd be fair to dig into cordova development and builds for such a small change.

Thanks,

Roman

Hi Roman,

i myself have been looking at making changes to this plugin for android use and the workflow i landed on is as follows:

  1. create a fork in github (only ned to do once)
  2. change the cszbarscanner.xml file 
  3. merge changes in github
  4. publish on github under a unique tag
  5. create a clone of the barcode scanner espace (only need to do once)
  6. change the extensibility config for your published copy of the repo using the published repo tag
  7. add to an application 
  8. compile an apk for native android
  9. install on android phone
  10. repeat for new changes

This is the fastest way i found for making these kind of changes. 

Thanks for the detailed explanation, Adam. Appreciate it