Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to take a photo using Google Glass without "tap to accept"?

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.

like image 989
Tom Kincaid Avatar asked Oct 01 '22 16:10

Tom Kincaid


2 Answers

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.
like image 168
TomTasche Avatar answered Oct 07 '22 18:10

TomTasche


You can use Cuxtom Cam library to perform that task that you want.

like image 24
Sheraz Ahmad Khilji Avatar answered Oct 07 '22 18:10

Sheraz Ahmad Khilji