Android Activity Results
<p>I have two activities in which I need to pass an object array between them.  From the main activity, I start the secondary activity with <code>startActivityForResult()</code>, and pass the array as a ParcelableArray in a Bundle.  This works fine to get the array to the secondary activity; I can pull the array out of the Bundle and manipulate it from there.</p>

<p>The problem I'm having is when I want to pass the array back to the calling activity.  I need it to occur when a user presses the back/return button on the device.  I've tried placing the array back into a Bundle, calling <code>setResult()</code> from within <code>onPause()</code> on the secondary activity, but I'm assuming this is the incorrect location to perform the task.  I've reached that conclusion as <code>getCallingActivity()</code> within <code>onPause()</code> returns null.</p>

<p>What's the proper way to return a Bundle to the calling activity in this situation?</p>

<p>Main Activity:</p>

<pre><code>    Bundle b = new Bundle();
    b.putParcelableArray("com.whatever.data", items);

    Intent folderView = new Intent(MainView.this, FolderView.class);
    folderView.putExtras(b);
    startActivityForResult(folderView, 1);
</code></pre>

<p>Secondary Activity:</p>

<pre><code>protected void onPause () {
    super.onPause();

    Intent result = new Intent();

    Bundle b = new Bundle();
    b.putParcelableArray("com.whatever.data", items);

    result.putExtras(b);

    setResult(Activity.RESULT_OK, result);
}
</code></pre>
