I have a code where i set the image captured from camera to an vector and then use image adapter to show the captured image.but im getting result code as 0 and data as null in OnActivityResut.Below is the code to launch a camera and it works i.e i click image using camera
Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(cameraIntent, CAMERA_REQUEST);
then i use OnActivityResult as below
protected void onActivityResult(int requestCode, int resultCode, Intent data)
{
if (requestCode == CAMERA_REQUEST && resultCode == RESULT_OK)
{
ImageView photo = (ImageView) data.getExtras().get("data");
m_oVectorOfImages.add(photo);
m_oImageAdapter.notifyDataSetChanged();
}
}
Can i know why resultcode is coming 0 and data as null?