Reputation: 2277
In my android application I am using custom camera with effects. 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.
Upvotes: 2
Views: 94
Reputation: 34390
It means the
EFFECT_BLACKBOARD
is not supported by your device. You must check whether theColorEffect
is supported by your Device.
CameraParameters.getSupportedColorEffects();
And check if it contains your effect then apply it.
Upvotes: 1