Android - How to delivery result to any activity?
<p>suppose that you have 3 Activities (A, B and C) and Activity A starts B, and B starts C. </p>

<p>I need that activity C delivery result to Activity A, because activity B is finished when starts activity C.</p>

<p>This code do not works:</p>

<pre><code>public class ActivityA extends Activity {
    @Override
    protected void onActivityResult(int requestCode, int resultCode,
            Intent data) {

        if (requestCode == ActivityC.REQUEST_CODE) {
            // need this code be called when activityC finish
        }
        super.onActivityResult(requestCode, resultCode, data);
    }
}

public class ActivityB extends Activity {

    void startActivityC() {
        Intent intent = new Intent();
        intent.setClass(this, ActivityC.class);
        startActivityForResult(intent, ActivityC.REQUEST_CODE);
        finish();
    }
}

public class ActivityC extends Activity {
    public static final int REQUEST_CODE = 12345;

    void finishActivity() {
        Intent intent = new Intent();
        intent.putExtra("example", "example");
        setResult(RESULT_OK, intent);
        finish();
    }
}
</code></pre>

<p>Any idea how to implement this?</p>

<p>Thank you!</p>
