Search code examples
androidandroid-camerashutter

android.hardware.camera preview : How to manually set exposure time, shutter speed, aperture, and iso


I am working on an app where I have a camera preview and I take pictures in dark settings. Therefore, I need a way to manually control the exposure time of the camera and the settings of shutter speed, aperture, and iso.

I know it must be possible because the application Long Exposure Camera 2 (by AAASDream) has a way to manually change the exposure time and it works perfectly. I am not referring to the exposurecompensation which I already tried but was not sufficient enough.

Based off of this post, I tried setting

Camera.Parameters params = camera1.getParameters();
params.set("mode", "m");
params.set("aperture", 80);
params.set("shutter-speed", 9);
params.set("iso", 1600);

But this did not work at all.

Is there any hidden API or setting that I can use or any third party library I can use to accomplish this.

All help is appreciated, thanks.


Solution

  • I think there is no way to manually set the above mentioned values in android.hardware.camera. But it looks like the new version android.hardware.camera2 supports those functionalities.