I want to use android phone camera to click a picture and then use it in another activity. I could not find any exact method, so I tried to get path of the picture where it is saved and then use it in the other activity.
private OnClickListener cameraBclicked = new OnClickListener() {
public void onClick(View v) {
Intent m_Intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(m_Intent, TAKE_PICTURE);
}
};
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data){
if ( requestCode == TAKE_PICTURE)
{
Uri selectedImage = data.getData();
Intent intent1 = new Intent(picsource.this,NewScreen.class);
intent1.putExtra("path", selectedImage);
startActivity(intent1);
}
Now, the problem is that the uri comes out to be null.. please correct the above code..