我有两个活动 A,B
从活动 A 中,我确实打开了我的画廊,我希望当从画廊中选择图片时,它应该在活动 B 上而不是在活动 C 上。
这可能吗??
share_picture.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Intent choosePic = new Intent(Intent.ACTION_PICK,
MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
startActivityForResult(choosePic, LOAD_IMAGE_GALLERY);
}
});
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
// TODO Auto-generated method stub
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == LOAD_IMAGE_GALLERY && resultCode == RESULT_OK
&& null != data) {
Uri selectedImage = data.getData();
String[] filePathColumn = { MediaStore.Images.Media.DATA };
Cursor cursor = getContentResolver().query(selectedImage,
filePathColumn, null, null, null);
cursor.moveToFirst();
int columnIndex = cursor.getColumnIndex(filePathColumn[0]);
picturePath = cursor.getString(columnIndex);
//I WANT TO CALL ACTIVITY B FROM HERE.. THAT AFTER THE PICTURE IS SELECTED IT SHOULD GO ON ACITIVITY B AND NOT ON A.
}
}
谢谢