views:

466

answers:

3

Need set zoom for camera preview...

+1  A: 

The ZXing app does zooming. Check around line 340

http://www.google.co.uk/codesearch/p?hl=en#z3Vnz2tRCuY/trunk/qrcode-scanner-live/android/src/com/google/zxing/client/android/CameraManager.java&android.hardware.camera%20lang:java&l=338

Jim Blackler
Yep, and let me slightly one-up you by pointing straight at the latest version of this. I've improved zoom handling since. http://code.google.com/p/zxing/source/browse/trunk/android/src/com/google/zxing/client/android/camera/CameraConfigurationManager.java
Sean Owen
A: 

I'm pretty sure the zxing code wont work on the Samsung Galaxy. The Camera.getParams() it returns do not contain any "zoom-supported" item.

Nor are there any "max-zoom" or "taking-picture-zoom-max" params on my Samsung Epic (a Galaxy S family model).

There is a "digi-zoom" but I dont find any info on it's usage.

mmeyer
A: 

(I'm the developer.) I agree with both answers above. Before Android 2.2 there is no "real" zoom API and some devices don't have an unofficial API that I can guess. You can try a Froyo build I'm working on that does use the real zoom API to see if it works. If it does I can share the code privately.

Sean Owen