title: Android Navigate up to parent activity from notification activity
body: <p>My question is that I have two activities, Activity A and Activity B. A is the main activity and A is the parent activity of activity B. Activity B is accessible by touching a notification or by activity A.</p>
  
  <p>Activity A start activity B like this:</p>
  
  <pre><code>            Intent intent = new Intent(getActivity(), B.class);
              startActivityForResult(intent, RESULT_ACTIVITY_1);
  </code></pre>
  
  <p>Notification starts activity B like this:</p>
  
  <pre><code>    Intent openIntent = new Intent(context, B.class);
      openIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
      PendingIntent pendingIntentOpen = PendingIntent.getActivity(context, 0 , openIntent, PendingIntent.FLAG_ONE_SHOT );
  
      contentView.setOnClickPendingIntent(R.id.textView5NotifyOpen,pendingIntentOpen);
  </code></pre>
  
  <p>Manifest for activity B:</p>
  
  <pre><code>    &lt;activity
          android:name=".B"
          android:parentActivityName=".MainActivity"
          android:theme="@style/Theme.AppCompat.Light.NoActionBar"&gt;
          &lt;meta-data
              android:name="android.support.PARENT_ACTIVITY"
              android:value="com.eee.ccc.MainActivity" /&gt;
      &lt;/activity&gt;
  </code></pre>
  
  <p>When activity B close send back to A some data:</p>
  
  <pre><code>        Intent returnIntent = new Intent();
          returnIntent.putExtra("Data",some data);
  
          setResult(Activity.RESULT_OK,returnIntent);
          finish();
  </code></pre>
  
  <p>So far everything works well, I'm able to launch activity B from A and from the notification but when I launch it from the notification when B terminate activity A is not called.
  Now what I want to do is that when I click on a notifications it starts activity B and when B close/finish his parent activity A is launched with <em>setResult(Activity.RESULT_OK,returnIntent);</em> and <em>onActivityResult(int requestCode, int resultCode, Intent data)</em> on activity A is called. 
  THANKS!</p>