0

I want to take a photo with the camera app which is default on the device. After taking it I have my own preview on which the user can input a text and accept the picture or refuse it. This already works fine.

My problem is now that some user has activated the preview option in the default camera app. Is there a parameter for the Intent to deactivate the default setting and send the picture directly to my app without a preview? I don't find a documentation for this case...

I start the camera with the following code

Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);

if (takePictureIntent.resolveActivity(this.getPackageManager()) != null) {
    this.startActivityForResult(takePictureIntent, MY_CAMERA_REQUEST_CODE);
}

The alternative is to create a own camera in my app. But this is in my opinion a little bit oversized.

Thanks in advance for any help.

mburm
  • 1,417
  • 2
  • 17
  • 37
  • 1
    http://stackoverflow.com/questions/11172705/android-how-to-capture-image-without-showing-preview – Carnal Mar 09 '15 at 13:23
  • http://stackoverflow.com/questions/9744790/android-possible-to-camera-capture-without-a-preview – Carnal Mar 09 '15 at 13:24

1 Answers1

1

There is no possibility to disable the preview programmatically. If something different is needed as the settings of the default camera, an own camera has to be implemented :-(

mburm
  • 1,417
  • 2
  • 17
  • 37
  • 1
    Also, with **MediaStore.ACTION_IMAGE_CAPTURE** intent, you have no control over which camera app is default on the specific device. Behavior of such apps may be significatly different. – Alex Cohn Apr 29 '15 at 13:04