title: Returning from an Activity started by a Fragment
body: <p>I have an application that uses Tabs. I used Fragments to implement the TabListeners. One of these Fragment starts 2 activities (depending on some buttons). </p>
  
  <p>I used the Eclipse interface to create these activities, meaning that Eclipse took care of all the work (creating the layout, updating the manifest etc.).</p>
  
  <p>I have no issue if I return from the activity using the return button on the phone.
  But if I use the "&lt;" symbol on the upper left corner of activity layout, I have an error:</p>
  
  <pre><code>01-04 02:56:56.000 E/Activity( 7556): getParentActivityIntent: bad parentActivityName 'com.android.nfcinfo2.FragmentCeSupport' in manifest
  
  01-04 02:56:56.007 E/NavUtils( 7556): getParentActivityIntent: bad parentActivityName 'com.android.nfcinfo2.FragmentCeSupport' in manifest
  
  01-04 02:56:56.007 D/AndroidRuntime( 7556): Shutting down VM**
  
  01-04 02:56:56.007 W/dalvikvm( 7556): threadid=1: thread exiting with uncaught exception (group=0x41c78b90)
  
  01-04 02:56:56.007 E/AndroidRuntime( 7556): FATAL EXCEPTION: main
  
  01-04 02:56:56.007 E/AndroidRuntime( 7556): Process: com.android.nfcinfo2, PID: 7556
  
  01-04 02:56:56.007 E/AndroidRuntime( 7556): java.lang.IllegalArgumentException: Activity EvtTransactionActivity does not have a parent activity name specified. (Did you forget to add the android.support.PARENT_ACTIVITY &lt;meta-data&gt;  element in your manifest?)
  
  01-04 02:56:56.007 E/AndroidRuntime( 7556):     at android.support.v4.app.NavUtils.navigateUpFromSameTask(NavUtils.java:177)
  </code></pre>
  
  <p>But it looks like my manifest is OK (FragmentCeSupport is the parent, EvtTransaction and SeRouting are the child activities):</p>
  
  <pre><code>  &lt;application
          android:allowBackup="true"
          android:icon="@drawable/stnfcinfo"
          android:label="@string/app_name"
          android:theme="@style/AppTheme" &gt;
          &lt;activity
              android:name="com.android.nfcinfo2.MainActivity"
              android:label="@string/app_name" &gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
  
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
          &lt;activity
              android:name="com.android.nfcinfo2.EvtTransactionActivity"
              android:label="@string/title_activity_evt_transaction"
              android:parentActivityName="com.android.nfcinfo2.FragmentCeSupport" &gt;
              &lt;meta-data
                  android:name="android.support.PARENT_ACTIVITY"
                  android:value="com.android.nfcinfo2.FragmentCeSupport" /&gt;
          &lt;/activity&gt;
          &lt;activity
              android:name="com.android.nfcinfo2.SeRouting"
              android:label="@string/title_activity_se_routing"
              android:parentActivityName="com.android.nfcinfo2.FragmentCeSupport" &gt;
              &lt;meta-data
                  android:name="android.support.PARENT_ACTIVITY"
                  android:value="com.android.nfcinfo2.FragmentCeSupport" /&gt;
          &lt;/activity&gt;
      &lt;/application&gt;
  </code></pre>
  
  <p>Here is how I start  the activities from the FragmentCeSupport:</p>
  
  <pre><code>@Override
  public void onClick(View v)
  {
      switch (v.getId())
      {
      case R.id.evt_tx_button:
      {
          Intent intent = new Intent(getActivity(), EvtTransactionActivity.class);
          startActivity(intent);
      }
          break;
  
      case R.id.routing_host_button:
      {
          Intent intent = new Intent(getActivity(), SeRouting.class);
          startActivity(intent);
      }
          break;
      }
  }
  </code></pre>
  
  <p>And here is the return code (generated by Eclipse) in EvtTransactionActivity:</p>
  
  <pre><code>@Override
  public boolean onOptionsItemSelected(MenuItem item)
  {
      switch (item.getItemId())
      {
      case android.R.id.home:
          // This ID represents the Home or Up button. In the case of this
          // activity, the Up button is shown. Use NavUtils to allow users
          // to navigate up one level in the application structure. For
          // more details, see the Navigation pattern on Android Design:
          //
          // http://developer.android.com/design/patterns/navigation.html#up-vs-back
          //
          NavUtils.navigateUpFromSameTask(this);
          return true;
      }
      return super.onOptionsItemSelected(item);
  }
  </code></pre>