I am looking for zooming and flash light implementation in android with webrtc.
I have tried using CameraManager manager for flash but it gives exception .
CameraManager camManager = (CameraManager) getSystemService(Context.CAMERA_SERVICE);
String cameraId = null; // Usually back camera is at 0 position.
try {
cameraId = camManager.getCameraIdList()[0];
camManager.setTorchMode(cameraId, true); //Turn ON
isFlashOn = true;
btnSwitch.setImageResource(R.drawable.icons_flash_on);
} catch (CameraAccessException e) {
e.printStackTrace();
}
Exception
CAMERA_IN_USE (4): setTorchMode:1483: Torch for camera "0" is not available due to an existing camera user
For zooming I have tried using camara parameters but it did not work.
if (zoom >= 0 && zoom < maxZoom) {
zoom++;
params.setZoom(zoom);
camera.setParameters(params);
}
I'd love to have this feature available.
Thanks in advance for updating this thread with the latest status.