[android-developers] Re: Camera Error 100 on Nexus One, not on G1.

2010-04-28 Thread Pavol Ban
Actually, here's more from the log.. this is the output right after autofocus is called, and before the output that i posted in the previous message. DEBUG/skia(824): purging 197K from font cache [28 entries] DEBUG/AUTOFOCUSING(824): hhh DEBUG/CameraService(798): autoFocus (pid 824)

[android-developers] Re: Camera Error 100 on Nexus One, not on G1.

2010-04-28 Thread wurp
Before takePicture, you must have called startPreview (without then calling startPreview). My picture taking code goes something like this: cam.startPreview(); cam.takePicture(); cam.stopPreview(); According to the android docs, takePicture itself stops the preview, but my experience is that I

[android-developers] Re: Camera Error 100 on Nexus One, not on G1.

2010-04-28 Thread Pavol Ban
That's the order i have my code in.. startPreview is called in the onCreate method so I didn't post it here. I'll take a look at the tutorial code, thanks :) On Apr 28, 3:19 pm, wurp bobbymart...@gmail.com wrote: Before takePicture, you must have called startPreview (without then calling

[android-developers] Re: Camera Error 100 on Nexus One, not on G1.

2010-04-28 Thread Streets Of Boston
Try to call the startPreview no earlier than the onResume. Maybe calling it in the onCreate is too soon. The SurfaceHolder may not yet be fully 'functional' (this is all guess-work on my part, but you could try :-)). On Apr 28, 9:54 am, Pavol Ban zum...@gmail.com wrote: That's the order i have

[android-developers] Re: Camera Error 100 on Nexus One, not on G1.

2010-04-28 Thread Pavol Ban
Geez.. i figured it out. The problem was my onTouchListener. In logCat i noticed that the log.d print saying Autofocusing was called 4 times, so i put the whole onTouch listener in an if statement looking something like this: if(event.getAction() == MotionEvent.ACTION_UP){} since apparently

[android-developers] Re: Camera Error 100 on Nexus One, not on G1.

2010-04-28 Thread wurp
In your original code you have: previewLayer.mCamera.stopPreview(); Camera.Parameters params = previewLayer.mCamera.getParameters(); params.setPictureSize(1200, 1600); previewLayer.mCamera.setParameters(params); Log.d(TAKING PICTURE, here); camera.takePicture(null, null, callback); Which looks