0

I have a phonegap app trying to be ported on the Google glass. Using the Barcode scanner plugin, I have included a barcode scanning feature for the glass device.

For a given Glass gesture (swipe right in my case), the camera is invoking, reading the barcode, giving me back the encoded text but the problem is my camera looks distorted like here -

enter image description here

I found something related to the same here but how do I apply this to a phonegap app? Need to get this going smooth with a proper camera dislpay.

Any help? Thanks in advance.

Community
  • 1
  • 1
Lohith Korupolu
  • 1,066
  • 1
  • 18
  • 52

1 Answers1

0

I had the problem (not phonegap) before and the solution for me is to call these in surfaceChanged:

Camera.Parameters parameters = mCamera.getParameters();
parameters.setPreviewFpsRange(30000, 30000);
parameters.setPreviewSize(640, 360);
mCamera.setParameters(parameters);

And I use https://github.com/DushyanthMaguluru/ZBarScanner for Glass barcode scanner, which works pretty well.

Jeff Tang
  • 1,804
  • 15
  • 16
  • 1
    how to do this for phonegap? I have options to edit parameters of Preview size (width and height)... but am not able to trace the FPS range... – Lohith Korupolu Feb 17 '14 at 09:31