I'm trying to get a picture, but with my code, is neccesary to confirm the image through "Tap" gesture.
Here is my code:
private void takePicture() {
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(intent, TAKE_PICTURE_REQUEST);
}
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == TAKE_PICTURE_REQUEST && resultCode == RESULT_OK) {
String thumbnailPath = data.getStringExtra(Intents.EXTRA_THUMBNAIL_FILE_PATH);
String picturePath = data.getStringExtra(Intents.EXTRA_PICTURE_FILE_PATH);
processPictureWhenReady(picturePath);
// TODO: Show the thumbnail to the user while the full picture is being
// processed.
}
else{
takePicture();
}
super.onActivityResult(requestCode, resultCode, data);
}
I have see this post:
Is it possible to take a photo using Google Glass without "tap to accept"?
But I can't get the picture without Tap. Is there any example?
Thanks!