Reputation: 7582
I am using native camera app to capture image, And I am not using MediaStore.EXTRA_OUTPUT to specify the path of image. Then how can i get the image using the intent.
Thanks.
Upvotes: 1
Views: 825
Reputation: 1836
To capture images using camera call this intent
Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(cameraIntent, requestCode);
and to handle the callback use onActivityResult function
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
Bitmap mImageBitmap;
Bundle extras = data.getExtras();
mImageBitmap = Bitmap.createScaledBitmap(
(Bitmap) extras.get("data"), 100, 100, false);
}
mImageBitmap will hold the image that you captured. Hope it helps :)
Upvotes: 1