Thanks, I tried out the startActivityForResult in the end and it
worked nicely. I was not sure if after coming back from C, A would be
updated but in fact it does. For the interested this is what I do
(simplified with 2 activities, 3 is basically the same process with
passing the position):

Caller Activity A
-----------------------------

@Override
protected void onListItemClick(ListView l, View v, int position, long
id) {

              Intent intent = new Intent(A.this, B.class);
              intent.putExtra("position", position );
              startActivityForResult(intent, 1);
}

@Override
protected void onActivityResult(int requestCode, int resultCode,
Intent data) {
        // TODO Auto-generated method stub
        super.onActivityResult(requestCode, resultCode, data);
        if(resultCode > 0){
                int position =  data.getExtras().getInt("position");
                //remove item at position
                //update adapter
        }
}

Receiving activity B
------------------------------

//set result
Intent in = new Intent();
in.putExtra("position", position);
setResult(1, in);
finish();

On Feb 16, 12:41 am, MagouyaWare <magouyaw...@gmail.com> wrote:
> If it were me I would use startActivityForResult() when starting both
> Activity B and C...  Activity C would return any pertinent information (if
> any) to Activity B.  Then Activity B can return the pertinent info back to
> A.
>
> When you get the result from B you update the Activity A based on that
> result...  Technically Activity A would not be updated until you returned
> back to Activity A (and not immediately when clicking the button in B and
> moving on to C) but the user experience is the same either way.
>
> The only thing to look out for would be if the user can get back to Activity
> A without pressing the back button...

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to