I am working on application where we are creating Activity B from Activity A. From Activity B, we are creating Activity C where we would like to return image and text back to Activity A.
Checked in Google but not get answer that I am looking for. Can you advice how this can be possible?
Thanks in advance for your help.
Update : First of all thnx for your answers. Let me explain my requirement more clearly.
Under Activity A, through Intent we open Gallery and choose Image. By defining startActivityForResult in this activity, we capture image that user picked and created new Intent (Activity B) where we took all parameters through putExtra function. We displayed user picked image here and allow user to edit image and put text. Now what we are looking for is to display Edited Image and text in already created Activity A. The data addition will be through List view were already few List view rows are present.
Hope we are more clear in our requirement now.
Thanks in advance for your help.
Update (showing some code as well)
Below code I applied in Activity A
Intent intent = new Intent(Intent.ACTION_PICK,
android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
intent.setType("image/*");
startActivityForResult(Intent.createChooser(intent, "Select File"), SELECT_FILE);
Results are available in Activity A through startActivityForResult as follows
if (requestCode == SELECT_FILE) {
Uri selectedImageUri = data.getData();
String[] projection =
{MediaStore.MediaColumns.DATA};Log.i("User_Chat_Page",
"projection="+selectedImageUri);
Cursor cursor =managedQuery(selectedImageUri,projection,null,null,null);
int column_index =
cursor.getColumnIndexOrThrow(MediaStore.MediaColumns.DATA);
cursor.moveToFirst();
String selectedImagePath = cursor.getString(column_index);
image_name = selectedImagePath;
Bitmap bm;
BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = true;
BitmapFactory.decodeFile(selectedImagePath, options);
final int REQUIRED_SIZE = 200;
int scale = 1;
while (options.outWidth / scale / 2 >= REQUIRED_SIZE
&& options.outHeight / scale / 2 >= REQUIRED_SIZE)
scale *= 2;
options.inSampleSize = scale;
options.inJustDecodeBounds = false;
bm = BitmapFactory.decodeFile(selectedImagePath, options);
Intent edit_image_intent = new Intent(ctx,
DrawOnBitmapActivity.class);
edit_image_intent.putExtra("selected_img_path",
selectedImagePath);
edit_image_intent.putExtra("selected_imguri", selectedImageUri);
edit_image_intent.putExtra("message_source", "to");
edit_image_intent.setData(selectedImageUri);
ctx.startActivity(edit_image_intent);
}
The image is displayed in Activity B (intent : edit_image_intent)were user edit image and put text.
My query is how we can able to bring the edit image and text in Activity-A. The display is required in List view as view rows are already displayed in Actiity-A (Eg. as in chat code)