I'm following the code here to capture an image with the Google Glass camera.
https://developers.google.com/glass/develop/gdk/media-camera/camera#capturing_images_or_video
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(intent, 1);
Everything is working fine, except that the camera activity requires the user to "tap to accept". Is it possible to just take the photo after a second or so?
This is how the built-in camera app works, I just say "ok glass, take a picture" and it takes a picture without requiring any additional confirmation. The camera in my app is already being activated by the user with other voice/taps in the interface so this second confirmation tap is undesirable.
Instead of opening the Google Glass camera app, you could take the picture yourself: http://developer.android.com/training/camera/cameradirect.html
This is even mentioned in the GDK reference:
Building your own logic with the Android Camera API. Follow these guidelines if you are using this method:
- Take a picture on a camera button click and a video on a long click, just like Glass does.
- Indicate to the user whether a picture was taken or a video was recorded.
- Keep the screen on during capture.
You can use Cuxtom Cam library to perform that task that you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With