Should onCaptureCompleted method be called continuously?

833 views Asked by At

my camera(camera2 api) eats so much from battery and device is being hot after 5 minutes running. During trying to find out where is the problem, i saw that onCaptureCompleted method of CameraCaptureSession.CaptureCallback is being called continuously when preview is in running state. Is it normal ?

1

There are 1 answers

0
Al Mamun On

If you call setRepeatingRequest() then it is normal to get multiple call in onCaptureCompleted(). If you want a single shot you can replace setRepeatingRequest() with capture() .

And the number of time onCaptureCompleted() called is depend on things like capture request's template type.