7 Replies Latest reply on Nov 13, 2013 2:11 AM by Mohit Raheja

    ET1 Scanner locking camera

    Daniel Goncalves


      Was just trying to do in Rhostudio a small example app to scan barcodes in the ET1 and came up with this problem.

      On the ET1 device, I'm using javascript to start the scanner when we tap on a button on screen after being enabled using meta tags.



       <META HTTP-Equiv="scanner" Content="enable">
       <META HTTP-Equiv="scanner" Content="DecodeEvent:url('javascript:doScan(%json);')">


       <a data-role="button" data-icon="search" href="javascript:scanBarcode();">Scan Barcode</a>



      function doSoftScan()


      This works fine but then if i try using the hardware buttons on the back of the device it gives this error on the console:


      D/CameraScanner( 1756): startScanning+
      W/CameraService(  643): CameraService::connect X (pid 1756) rejected (existing client).
      E/CameraScanner( 1756): Unable to lock camera... scanning failed
      D/CameraScanner( 1756): failed com.motorolasolutions.emdk.scanning.camera.CameraScanner$StateHandler@405460e8


      If i use the hardware button first it's the soft scan that gives the error. Is there a way to release the lock on the camera or other way to avoid these?