google / cameraview

[DEPRECATED] Easily integrate Camera features into your Android app
Apache License 2.0
4.74k stars 1.03k forks source link

Camera is not ready. Call start() before takePicture. #156

Open vijaysshelke opened 7 years ago

vijaysshelke commented 7 years ago

Faced new issue Camera is not ready. Call start() before takePicture. Please provide solution. This issue came in camera1 API.

cybercitizen7 commented 7 years ago

Hello vijazsshelke!

What do you mean, what kind of issue is exactly occuring to you?

You have to call camera.start() before taking pictures, that holds true, yes. You have to do it in onResume() lifecycle method of Android.

That is how it works.

aswalalka commented 7 years ago

I am also facing the same issue, it comes randomly, how to fix it?

xiaanming commented 7 years ago

To start an new preview activity before take pictrue success, then click on the photo button quickly can load to crash