Oh wait, I completely missed the part where you wrote: "without starting preivew first"
You have to start preview first. In theory, you can call takePicture() from the first preview callback, or from the auto-focus callback. In practice, due to a bug in the G1 camera driver, you have to wait for the second preview callback. On Jan 20, 9:44 am, Pascal Merle <pme...@kph.uni-mainz.de> wrote: > On the G1! > > On 20 Jan., 18:22, Dave Sparks <davidspa...@android.com> wrote: > > > Is this on the emulator or on G1? > > > On Jan 18, 12:40 pm, Pascal Merle <pme...@kph.uni-mainz.de> wrote: > > > > I am standing a bit in the dark with the android.hardware.Camera > > > class. > > > > What I tried to do is taking a picture without starting preview first: > > > Camera mCamera = Camera.open(); > > > mCamera.takePicture(null, null, mPictureCallback); > > > > In the callback routine I get JPEG data of fixed length, always 52K > > > long. It has the right resolution but it's all black (independent of > > > the real object!!). Do you know if this is a bug? Do I need to start a > > > preview before taking a picture? Can this be done from within a > > > service (no activity)? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---