Camera2 api clicks multiple images on single click

469 Views Asked by At

I am using camera2 api to capture images in my android application. When i am clicking on button to capture image it clicks multiple images on just one click. This issue happens only on few devices. Any suggestion to stop clicking multiple images on one click?

1

There are 1 best solutions below

0
On

I've the same problem.

I've added a boolean flag captureRequested which I set to true when I send a capture request, and false when I receive the image inside the onImageAvailableListener.

I'm sure it's not the best answer. If anyone has a better one...