[英]Application is crashing while calling camera.setParameters(parameters);
In my android application I am using custom camera with effects. 在我的android应用程序中,我正在使用具有效果的自定义相机。 While i am calling
当我打电话时
parameters.setColorEffect(Camera.Parameters.EFFECT_NEGATIVE);
camera.setParameters(parameters);
the application is working well but while I am calling 该应用程序运行良好,但是当我打电话时
parameters.setColorEffect(Camera.Parameters.EFFECT_BLACKBOARD);
camera.setParameters(parameters);
the application leads to the following exception 该应用程序导致以下异常
01-21 17:32:13.656: E/AndroidRuntime(5932): java.lang.RuntimeException: setParameters failed
01-21 17:32:13.656: E/AndroidRuntime(5932): at android.hardware.Camera.native_setParameters(Native Method)
01-21 17:32:13.656: E/AndroidRuntime(5932): at android.hardware.Camera.setParameters(Camera.java:1494)
Can anyone help me. 谁能帮我。
Thanks. 谢谢。
It means the
EFFECT_BLACKBOARD
is not supported by your device.这意味着您的设备不支持
EFFECT_BLACKBOARD
。 You must check whether theColorEffect
is supported by your Device.您必须检查设备是否支持
ColorEffect
。
CameraParameters.getSupportedColorEffects();
And check if it contains your effect then apply it. 并检查它是否包含您的效果,然后应用它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.