android camera samsung galaxy i9003 setParameters

2019-09-18 22:45发布

问题:

I'm developing android camera application. Tested on some devices and it work's, but on samsung galaxy i9003 setparameters didn't work. Here how I do it: cameraParams.setColorEffect([some supported effect]); camera.setPrameters(cameraParams); [some supported effect] I get with cameraParams.getSupportedColorEffects().

My code is not as simple as I wrote , but in the end it do this.

It works on many devices including samsung galaxy s i9000 ( though I must do some trick on i9000, there is known bug in params when you get params with params.flatten() there is spaces in parameters).

Please some help, it's first time I'm writing here.

回答1:

Different devices will have different camera capabilities so you should check that the parameter that you wish to set is indeed supported by the device e.g. call getSupportedColorEffects() - this gives you a list of supported effects or null so you can check this before you try to set them.