The camera preview code was written to mimic the operation of the camera hardware in pre-1.0 versions of Android. It largely became obsolete with the release of 1.0 and the availability of real phones that one can use for running one's applications. I chose not to emulate the newer Camera functionality because there was no workable approach at that time. Now that I'm able to develop native libraries it might be possible, but hardware is now so widely available that it doesn't seem worthwhile. Assuming that your application doesn't deviate from the 'norms' of barcode detection, the zxing library provides an excellent template. For what it's worth, my experience is that you really have to test any application that uses the camera preview functionality directly on the hardware. The operation of the camera is reliable, but under a narrow (and it seems largely unspecified) range of parameters.
I'm sorry to say that it's my personal judgement that the hardware Camera API is the poorest quality API in the entire framework (and I've used them all with the exception of the latest audio related functionality). There are lots of reasons that poor APIs can arise that are no fault of the implementers. so I'm not trying to complain or point fingers, but you should be prepared for quite a lot of frustration. Perhaps others have a different take. Tom. 2009/6/11 jgautier <[email protected]> > > HI All, > > I am new to Android development and I am working on an app that will > use the camera to scan barcodes similar to many other apps out there. > Based on what I have read here: > http://developer.android.com/guide/developing/tools/emulator.html > the AVD does not support any camera input. So what I did was I used > some of the classes on this page: > http://www.tomgibara.com/android/camera-source. > I am streaming my local webcam over http and capturing the frames in > the AVD and displaying them. This is working fine. Now that I have > this working I wanted to look into how the http://code.google.com/p/zxing/ > could be implemented. However I think these two implemenations don't > work well together. zxing uses events such as Camera.PreviewCallback > which I dont have access to using my camera capturing. Also the > scanning is using the byte[] data passed into the event handler, and > with my implementation I only have access to a bitmap. > > How have you guys worked around this limiation? > > Thanks, > jgautier > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

