No ideias for this?

I just keep reading on google to release the camera.. and I've just done that but I get the error anyway..

On Sep 22, 2010, at 11:43 PM, Pedro Teixeira wrote:

Hi, I'm getting this error ( in the end of this post)... which I guess
I understand it's because I'm calling something after releasing it..
but I can't find a wy to work it around... Here is the method:

public void surfaceDestroyed(SurfaceHolder holder) {
                mPreviewRunning = false;
                mCamera.stopPreview();
                mCamera.release();
        }

I've tried all combinations.. I've tried:
mCamera.setPreviewCallback(null);
This class, where the surfaceview is implemented can be accessed by 2
different classes.. one that doesnt implement surfaceview and other
that does.. the error just shows me when I go from the activity that
uses the camera to the activity that also uses camera.. I don't know
what else to do.. I've google it and can't find any answer. any
suggestion?


09-22 19:55:57.475: ERROR/AndroidRuntime(900):     Uncaught handler:
thread main exiting due to uncaught exception
09-22 19:55:57.605: ERROR/AndroidRuntime(900):
java.lang.RuntimeException: Method called after release()
09-22 19:55:57.605: ERROR/AndroidRuntime(900):     at
android.hardware.Camera.stopPreview(Native Method)
09-22 19:55:57.605: ERROR/AndroidRuntime(900):     at
com.pedroteixeira.thennnow.cameraView.surfaceDestroyed (cameraView.java:
184)
09-22 19:55:57.605: ERROR/AndroidRuntime(900):     at
android.view.SurfaceView.reportSurfaceDestroyed(SurfaceView.java:426)
09-22 19:55:57.605: ERROR/AndroidRuntime(900):     at
android.view.SurfaceView.updateWindow(SurfaceView.java:351)
09-22 19:55:57.605: ERROR/AndroidRuntime(900):     at
android.view.SurfaceView.onWindowVisibilityChanged(SurfaceView.java:
182)

--
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

Pedro Teixeira

www.pedroteixeira.org

--
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

Reply via email to