TaskStackBuilder and extras for the back stack
<p>I'm trying to use <a href="http://developer.android.com/reference/android/app/TaskStackBuilder.html" rel="nofollow">TaskStackBuilder</a> with notifications to create a back stack for the back button to go through.  Normal flow of my app:</p>

<ol>
<li>Activity A is launched from the launcher.</li>
<li>User selects an item from A, which launches B with extras for what to load.</li>
<li>User selects an item from B, this launches C with extras for what to load.</li>
</ol>

<p>Sometimes, after a background update when the user isn't using my app, I generate a notification.  If they click this notification, it launches Activity C, skipping A and B.  I'm trying to follow the design guidelines and create a back stack, so when they press back it will go to Activity B instead of the home screen.  My problem is that Activity B requires an extra in its launch intent to tell it what to grab from the database.</p>

<p>My current TaskStackBuilder code:</p>

<pre><code>TaskStackBuilder sBuilder = TaskStackBuilder.create( this );
sBuilder.addParentStack( ActivityC.class );
sBuilder.addNextIntent( launchIntent );

pIntent = sBuilder.getPendingIntent( 0, PendingIntent.FLAG_ONE_SHOT );
</code></pre>

<p>Clicking on the notification launches Activity C just fine, but when I press back it explodes with an <code>IllegalArgumentException</code> from my ContentProvider because Activity B doesn't know what ID to request.  Is there any way to get this extra into the back stack or am I stuck?</p>
