3 Replies Latest reply on Jul 5, 2012 7:07 AM by Divyansh Madan

    ET1 Barcode Scanning ISSUE

      Hi All,

       

      I have just started working on ET1 using Rhoelement , issue  i ma facing with ET1, I am not able to catch global event or can say  manual machine scan event for barcode,

       

      for example i wrote a application that will read barcode and place in simply in textbox.

       

      def index

              if !$scanners

                $scanners = []

                Barcode.enumerate(url_for(:action => :enumerate_callback))

                multiscan()

            else

            end

      end

       

      def enumerate_callback

      $scanners = @params['scannerArray']

        end

        

        def multiscan

          $scanners.each do |scan|

            @scanername = scan['deviceName']

          end

         

          scanner = @scanername

          #      puts "multiscan - using scanner: #{scanner}"

          #$barcodes = []

          Barcode.enable( url_for(:action => :multi_callback), {:deviceName => scanner})

        end

       

        def multi_callback

             begin

                status = @params['status']

                 barcode = @params['barcode']

                 WebView.execute_js("addBarcode('#{barcode}')")

          rescue Exception => e

            Alert.show_popup(e.message)

           end

      end

       

      this enable the barcode scanner camera  while you reading the barcode but once you did not scan a barcode and camera is disappear and  we trigger ET1 barcode button camera will display and scan a barcode but we are not able to capture the data that is sent by scanner , my assumption is barcode scanning manual from machine ET1 is create a different  object , How can we find that object ???

       

      or any other way to capture machine bar code scan event ...