RedApparat / Fotoapparat

Making Camera for Android more friendly. 📸
Apache License 2.0
3.82k stars 408 forks source link

Add method isStarted() to get the started status of the camera #93

Closed alexander-fischer closed 7 years ago

Diolor commented 7 years ago

By the time you call onStart we assure that the camera started. Therefore this should be handled in the client and there is no benefit in FA

alexander-fischer commented 7 years ago

The problem is that an exception is thrown, if onStart() is called, when camera is already started. It would be easier to return this boolean, so that it can be checked beforehand.

Diolor commented 7 years ago

You mean IllegalStateException("Camera is already started!") ? As said above, if you call onStart it's the app's (and not this library's) responsibility to know weather or not you called onStart

alexander-fischer commented 7 years ago

Ok this is a stupid assumption, but I accept this as an answer.