I've followed the Glass guide for taking a picture, found here. However, this creates a new Intent that automatically captures a picture without creating a camera preview in the Glass viewport.
In an attempt to allow the user to first preview what the camera sees on the glass' viewport, I followed the android developer guide, found here, and eventually ran into a runtime exception being thrown when attempting to call Camera.open()
:
java.lang.RuntimeException: Fail to connect to camera service
The developer guide wraps Camera.open()
in a try-catch clause but doesn't explain what to do in the event an exception is raised.
Here are my questions:
- Is there any way to see if any other Android process / service has a lock on the Glass' camera?
- If so, how can I tell that process / service to give me the camera?
- Perhaps in the Glass developer guide I linked, is there a way to let the user preview the image before the picture is taken?
Thanks for any help!