HTC Desire HD not accepts setParameter() with hardware.Camera?

The problem isn't to do with your phone but rather the parameters you're setting for the camera resolution. I had a similar issue when learning to use the camera on a Nexus One. You need to get a list of known resolutions which works on the phone the code is working on and set it to one of those Are you sure get parameters doesn't work?

Can you post the code which didn't work? Perhaps you're doing it wrong.

The problem isn't to do with your phone but rather the parameters you're setting for the camera resolution. I had a similar issue when learning to use the camera on a Nexus One. You need to get a list of known resolutions which works on the phone the code is working on and set it to one of those.

Are you sure get parameters doesn't work? Can you post the code which didn't work? Perhaps you're doing it wrong.

Ok, problem resolved with this code : @Override public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) { // Now that the size is known, set up the camera parameters and begin // the preview. Camera. Parameters parameters = mCamera.getParameters(); List sizes = parameters.

GetSupportedPreviewSizes(); Size optimalSize = getOptimalPreviewSize(sizes, w, h); parameters. SetPreviewSize(optimalSize. Width, optimalSize.

Height); mCamera. SetDisplayOrientation(90); parameters. SetRotation(90); mCamera.

SetParameters(parameters); mCamera.startPreview(); }.

Okay, I Discover another simple solution : In Android Manifest, add to camera activity this property : android:screenOrientation="landscape" And, in Camera App for surfaceChanged : just this : public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) { Camera. Parameters parameters = mCamera.getParameters(); mCamera. SetParameters(parameters); mCamera.startPreview(); } Regards.

02-14 21:38:05.818: ERROR/AndroidRuntime(2884): at android.hardware.Camera. 02-14 21:38:05.818: ERROR/AndroidRuntime(2884): at android.hardware.Camera. 02-14 21:38:05.818: ERROR/AndroidRuntime(2884): at android.hardware.Camera.

02-14 21:38:05.818: ERROR/AndroidRuntime(2884): at com.example.android.apis.graphics.Preview. 02-14 21:38:05.818: ERROR/AndroidRuntime(2884): at android.view.SurfaceView.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions