Freigeben über


MediaStore.ActionImageCapture Field

Definition

Standard Intent action that can be sent to have the camera application capture an image and return it.

[Android.Runtime.Register("ACTION_IMAGE_CAPTURE")]
public const string ActionImageCapture;
[<Android.Runtime.Register("ACTION_IMAGE_CAPTURE")>]
val mutable ActionImageCapture : string

Field Value

Attributes

Remarks

Standard Intent action that can be sent to have the camera application capture an image and return it.

The caller may pass an extra EXTRA_OUTPUT to control where this image will be written. If the EXTRA_OUTPUT is not present, then a small sized image is returned as a Bitmap object in the extra field. This is useful for applications that only need a small image. If the EXTRA_OUTPUT is present, then the full-sized image will be written to the Uri value of EXTRA_OUTPUT. As of android.os.Build.VERSION_CODES#LOLLIPOP, this uri can also be supplied through android.content.Intent#setClipData(ClipData). If using this approach, you still must supply the uri through the EXTRA_OUTPUT field for compatibility with old applications. If you don't set a ClipData, it will be copied there for you when calling Context#startActivity(Intent).

Regardless of whether or not EXTRA_OUTPUT is present, when an image is captured via this intent, android.hardware.Camera#ACTION_NEW_PICTURE won't be broadcasted.

Note: if you app targets android.os.Build.VERSION_CODES#M M and above and declares as using the android.Manifest.permission#CAMERA permission which is not granted, then attempting to use this action will result in a java.lang.SecurityException.

Java documentation for android.provider.MediaStore.ACTION_IMAGE_CAPTURE.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

See also