How can I receive CameraActivities result in a DIFFERENT Activity (i.e. not in the launching one)?

Posted by steff on Stack Overflow See other posts from Stack Overflow or by steff
Published on 2010-03-12T18:56:00Z Indexed on 2010/03/16 7:36 UTC
Read the original article Hit count: 331

Filed under:
|
|

Hi,

I hope the title says it all: I've got Activity A which fires up the Camera intent via:

Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(intent, REQUEST_CAMERA);

After the picture is taken I can easily grab the picture in:

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data)

But I'd like to receive the result in Activity B in which the image can be edited. Right now I'm receiving the result in Activity A and pass it over to Activity B which results in showing the GUI of Activity A for a short while:

Intent i = new Intent().setAction("DisplayJPEG");
i.setClass(this, EditImageActivity.class);
i.putExtra("IMAGE_URI", uri);
startActivityForResult(i, REQUEST_EDIT_IMAGE);

Of course, I will need the result from Activity B in Activity A after the image has been edited. But that should work with:

setResult(resultCode, data);

So there has to be a way to do what I need. Please point me into the right direction.

Thanks in advance, steff

© Stack Overflow or respective owner

Related posts about android

Related posts about camera