1
0
-1

I have been pointed at a github link for a cordova plugin to allow reading barcodes from a handheld bluetooth scanner on a mobile app. 

https://github.com/cvanem/capturesdk-cordova

I am an utter novice in all these things (github, cordova, buildozer). Can someone with more of a clue give it a look see and see if I can just include an nvm link to buildozer or otherwise how I get it accessed from within my app? 

Thanks in advance. 

Iain


    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      Hello Iain

      You could check the Barcode browser source (JS & Java) to create your own for the external barcode scanner.
      We use: https://github.com/phonegap/phonegap-plugin-barcodescanner version v6.0.8

      The mentioned URL does not contain much.
      Better check the basics of cordova in https://codingsans.com/blog/cordova-android-plugin

      You might change the barcodescanner code to the code you need, and put into an external git repository.
      Then that URL can be added an URL to Uniface.


      Peter

      1. Iain Sharp

        HI Peter, 

        As I understand it, this project is an interface to a java companion app which has to be downloaded to the device in order to talk to this specific brand of handheld barcode scanners. This is not to use the phone/tablet as a barcode scanner, which we have already integrated. As I am sure you are aware, the phone camera barcode scanner is not good for large quantities of scans in a short space of time. 

        I could possibly look at their javascript source and copy/paste it into my DSP I suppose, but I was hoiping I'd just missed a simple trick on how to find the name I use to add this project to my buildozer build, and switch straight to using the code. 


        Regards, 


        Iain

      2. Sjaak van Schie

        Hi Iain,

        If you press clone/download button on a repository on the mentioned page, then you get the GIT url to use in Uniface mobile app creation. Buildozer will then include the code and create a cordova app. Hope that helps you.

        PS: The included source code of Android doesn't do much.

        Kind regards, Sjaak

      CommentAdd your comment...
    2.  
      1
      0
      -1

      Hello Iain


      For a mobile app you will need to define a Startup Shell type Mobile.

      There you can add your plugins via the Plugins property.

      In the Uniface library  there is documentation on the page 

      Startup Shells for Mobile Apps

      Plugins

      List of npm (Node Package Manager) names or public URLs of the plugins to be included in the app.

      To define a specific version of the plugin you want to use, append PluginVersion to the npm name using an ampersand (@), or to the public URL using a hash symbol (#). For example:

      npm name: cordova-plugin-camera@2.4.1

      URL: https://github.com/apache/cordova-plugin-camera.git#2.4.1

      Note:  Using URLs is less stable than using the plugin name.

      If not specified, the most recent version is used.


      Hope this helps.


      Peter

      1. Iain Sharp

        Thanks for this Peter, and I have (with the help of a consultant from Uniface) included a few 'standard' plugins. However, I think what I am missing is the base knowledge of how one determines the NPM name or base URL from a link to a GitHub repository... 

        It's the base understanding of the web/android world I am short of, and without a good grounding in that, I think it's difficult to determine how uniface/buioldozer has implemented it. All the online examples are (understandably) for other languages with different methods of inclusion... 

      CommentAdd your comment...