title: Passing back data to a Paused Activity
body: <p>I am having some trouble using intents to pass data between my Activities, specifically their appears to be a problem when I am passing data to a pervious activity when the current activity is paused. </p>
  
  <p>From the first activity I start it like this:</p>
  
  <pre><code>//Create the activity we want to run and place it in an Intent
    Intent i = new Intent(activity, JVoiceActivity.class);
  
    //Create a bundle for passing some data.
    Bundle b = new Bundle();
  
    //Pass that this is a recording.
    b.putBoolean("Record", true);
    i.putExtras(b);
  
    //Start it.
    activity.startActivityForResult(i, 0);
  </code></pre>
  
  <p>The reason I am using activity instead of just startActivityForResult is because this is another class that I pass the activity to keep my project Object Orientated.</p>
  
  <p>Then on the new Activity I close it like this:</p>
  
  <pre><code> public void onPause()
   {   
     Bundle bundle = new Bundle();
  
     bundle.putString("Path", mPath);
     Intent i = new Intent();
  
     i.putExtras(bundle);
  
     setResult(RESULT_OK, i);
  
     super.onPause();
   }
  </code></pre>
  
  <p>Finally in the first Activity I have the function:</p>
  
  <pre><code>protected void onActivityResult(int requestCode, int resultCode, Intent data)
   {
    if(data!= null)
    {
  </code></pre>
  
  <p>This function is being called but the Intent data is always null. I am assuming its the way I close the second activity as I did have this working before when I was testing it, at the time I was calling Finish() straight away from my second activity after setting mPath for testing purposes.</p>
  
  <p>Any help is greatly appreciated.</p>