On Mon, Jan 11, 2010 at 8:51 PM, Dani <[email protected]> wrote: > Hello > > I keep getting error messages when running my photo applications on a > Nexus One with api version 7 when the program tries to set the camera > parameters: > > ... > Camera.Parameters parameters = camera.getParameters(); > Please call getSupportedPreviewSizes to get valid preview sizes. 533x320 is invalid on Nenus One. http://developer.android.com/reference/android/hardware/Camera.Parameters.html#getSupportedPreviewSizes()
> parameters.setPreviewSize(w, h); // data set: w:533, h:320 > camera.setParameters(parameters); > ... > > ... > Camera.Parameters parameters = camera.getParameters(); > Please call getSupportedPictureSizes to get valid picture sizes. http://developer.android.com/reference/android/hardware/Camera.Parameters.html#getSupportedPictureSizes() > parameters. setPictureSize(w, h); // data set w:1280, h:768 > camera.setParameters(parameters) > ... > > The prorgram works fine on various other mobile phones such as moto > droid or HTC Hero. > > Any idea what it could be? I would appreciate some help! > > cheers > Dani > > > ---------------------------------------------- > The stack trace I get is: > ---------------------------------------------- > java.lang.RuntimeException: setParameters failed > at android.hardware.Camera.native_setParameters(Native Method) > at android.hardware.Camera.setParameters(Camera.java:619) > at dk.android.bcFiler.PreviewSurface.surfaceChanged > (PreviewSurface.java:149) > at android.view.SurfaceView.updateWindow(SurfaceView.java:460) > at android.view.SurfaceView.dispatchDraw(SurfaceView.java:287) > at android.view.ViewGroup.drawChild(ViewGroup.java:1529) > at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258) > at android.view.ViewGroup.drawChild(ViewGroup.java:1529) > at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258) > at android.view.View.draw(View.java:6538) > at android.widget.FrameLayout.draw(FrameLayout.java:352) > at android.view.ViewGroup.drawChild(ViewGroup.java:1531) > at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258) > at android.view.View.draw(View.java:6538) > at android.widget.FrameLayout.draw(FrameLayout.java:352) > at com.android.internal.policy.impl.PhoneWindow$DecorView.draw > (PhoneWindow.java:1830) > at android.view.ViewRoot.draw(ViewRoot.java:1349) > at android.view.ViewRoot.performTraversals(ViewRoot.java:1114) > at android.view.ViewRoot.handleMessage(ViewRoot.java:1633) > at android.os.Handler.dispatchMessage(Handler.java:99) > at android.os.Looper.loop(Looper.java:123) > at android.app.ActivityThread.main(ActivityThread.java:4363) > at java.lang.reflect.Method.invokeNative(Native Method) > at java.lang.reflect.Method.invoke(Method.java:521) > at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run > (ZygoteInit.java:860) > at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) > at dalvik.system.NativeStart.main(Native Method) > > -- > 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]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en >
-- 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

