Problem with View Finder on Android

// Expert user has replied.
H HAYTHAM KAOUKJI 3 years 7 months ago
3 3 0

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

Please Register or Login to post a reply

3 Replies

H HAYTHAM KAOUKJI

Any idea ???

R Robert Galvin

The viewfinderMode property is only available on Windows Mobile/CE Zebra devices. This is not available on Android as well as consumer grade devices.

I assume your device is using the camera to decode the barcode and the viewfinder is really needed to help the user aim and to see if the barcode is in focus. What kind of experience would the user have without having this?

H HAYTHAM KAOUKJI

Hello Rob,

I have a big problem with the View Finder on Android Devices, especially on the Devices have a high resolution like Galaxy S5(see attached image). the view finder appear very small when you open the bar code scanner.

So after searching i found that we can disable the view finder and if you can see under description of viewfinderMode you have the Android Icon, so that mean this functionality is available on Android devices ?!!

Best Regards,

CONTACT
Can’t find what you’re looking for?