android - How to add a dynamically resolved activity name to the back stack (without using PARENT_ACTIVITY)? -
the goal is
1) start activity appwidgetprovider or other background task (it simple).
2) activity go activity b after clicking button.
the problem can't set parent_activity in androidmanifest.xml, because activity b class name gets determined @ run time. in 1 case need go activity b, in other case activity. seems can't use taskstackbuilder without parent_activity.
i handle in finish() method of activity a, should simpler way add activity b "back stack" when run startactivity(intent). ideas?
use startactivities(intent[]) synthesize own backstack of activity instances. example:
intent activityb = new intent(context, activityb.class); intent activitya = new intent(context, activitya.class); // should ordered bottom of stack top of stack intent[] activities = new intent[] { activityb, activitya }; context.startactivities(activities);
Comments
Post a Comment