Example usage for android.provider MediaStore ACTION_IMAGE_CAPTURE

List of usage examples for android.provider MediaStore ACTION_IMAGE_CAPTURE

Introduction

In this page you can find the example usage for android.provider MediaStore ACTION_IMAGE_CAPTURE.

Prototype

String ACTION_IMAGE_CAPTURE

To view the source code for android.provider MediaStore ACTION_IMAGE_CAPTURE.

Click Source Link

Document

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

Usage

From source file:Main.java

public static Intent takePicture(Uri uri) {
    Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
    intent.putExtra(MediaStore.EXTRA_OUTPUT, uri);
    return intent;
}

From source file:Main.java

public static Intent buildCaptureIntent(Uri uri) {
    Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
    intent.putExtra(MediaStore.EXTRA_OUTPUT, uri);
    return intent;
}

From source file:Main.java

public static Intent getCaptureIntent(Uri uri) {
    Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
    if (uri != null) {
        intent.putExtra(MediaStore.EXTRA_OUTPUT, uri);
    }// w w w .j av  a  2s  . c o  m
    return intent;
}

From source file:Main.java

public static Intent buildImageCaptureIntent(Uri uri) {
    Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
    intent.putExtra(MediaStore.EXTRA_OUTPUT, uri);
    return intent;
}

From source file:Main.java

public static Intent getCameraIntent(Uri saveFileURI) {
    Intent mIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
    return mIntent.putExtra(MediaStore.EXTRA_OUTPUT, saveFileURI);
}

From source file:Main.java

public static Intent getCameraIntent(final Uri saveFileURI) {
    Intent mIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
    return mIntent.putExtra(MediaStore.EXTRA_OUTPUT, saveFileURI);
}

From source file:Main.java

public static void captureImage(Activity activity, int CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE) {
    Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
    activity.startActivityForResult(intent, CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE);
}

From source file:Main.java

public static Intent getPhotoPickerIntent(Uri photoUri) {
    Intent captureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
    addPhotoPickerExtras(captureIntent, photoUri);
    return captureIntent;

}

From source file:Main.java

public static void takePhoto(Activity activity, int requestCode, Uri uri) {
    Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
    intent.putExtra(MediaStore.EXTRA_OUTPUT, uri);
    activity.startActivityForResult(intent, requestCode);
}

From source file:Main.java

/**
 * Utility method so you don't need to remember the MediaStore action.
 * @return//from   ww  w.  ja v a2s .  c om
 */
public static Intent getCameraIntent() {
    return new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
}