/** * Get the intent at the specified index. * Useful if you need to modify the flags or extras of an intent that was previously added, * for example with {@link #addParentStack(Activity)}. * * @param index Index from 0-getIntentCount() * @return the intent at position index * * @deprecated Renamed to editIntentAt to better reflect intended usage */ public Intent getIntent(int index) { return editIntentAt(index); }
Intent intentC = new Intent(context, ActivityC.class); intentC.putExtra(key, valueC); TaskStackBuilder sBuilder = TaskStackBuilder.create(this) .addParentStack(ActivityB.class) .addParentStack(ActivityC.class) .addNextIntent(intentC); Intent intentA = sBuilder.editIntentAt(0); intentA.putExtra(key, value); Intent intentB = sBuilder.editIntentAt(1); intentB.putExtra(key, value);