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 ...

Nrusingha Chara...
Hello Sourabh,Use Scanner API

Hello Sourabh,

Use Scanner API for Barcode reading in your application and refer this link for more information  http://docs.rhomobile.com/rhoelements/scanner

and build you application with app_type rhoelements in build.yml

Please follow the discussion also https://developer.motorolasolutions.com/message/4049#4049

Thank You.

Patro

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Divyansh Madan
try this apphttps://github
Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Adel Sari
Hollo Sourabh,you must

Hollo Sourabh,

you must disable dataWedge on ET1, i had the same problem, and it worked for me.

you can have a look on this discussion: https://developer.motorolasolutions.com/thread/1626

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments