4 Replies Latest reply on Mar 17, 2015 6:25 AM by Robert Galvin

    Problem with View Finder on Android

    HAYTHAM KAOUKJI

      Hello,

       

      I have a problem with View Finder on All Android devices especially on the New devices like S5, the view finder is very small. so i found some code to remove the view finder on Android device but i don't know exactly where i can put this code to remove the view finder.

       

      Constant: Rho.Barcode.VIEWFINDER_DISABLED (For Ruby use "::" instead of ".")

      String: disabled

      The viewfinder will not be displayed during aiming or scanning.

       

      my barcode scanner code:

      def scanbarcode

          # Scan with default options

          Rho::Barcode.take({}, url_for(:action => :scan_received))

        end

         

        def scan_received

          # Did we actually find a barcode ?

          # If status is not 'ok', the scan was cancelled

       

          if @params["status"] == "ok"

             WebView.executeJavascript("addBarcodeToTextField('#{@params["barcode"]}')")

          else

            Rho::Log.info("Cancelled", "Barcode result")

          end

        end

       

      please help me to add this code to remove the view finder on Android devices.

       

      Best Regards