capture Image via Intent - Android Intent

Android examples for Intent:Take Picture

Description

capture Image via Intent

Demo Code


//package com.java2s;
import android.app.Activity;
import android.content.Intent;

import android.provider.MediaStore;

public class Main {
    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);
    }/*w w w.  j a v  a  2s  .c o  m*/
}

Related Tutorials