The activity stack in my real app is not hard coded. A can start B, or
C which can start D and D can start A or B or C depending on user
selection or other flow. And this happens rather frequently. Each of
them in reality should exist in only one instance and the activity
should be shown or brought to top rather then re-created. However, I
can handle re-creating activity when started from another activity, I
just need to ensure that previous activity instance is completely
destroyed and all its resources are de-alocated and freed.


On May 17, 9:56 pm, blcooley <blcoo...@gmail.com> wrote:
> If you need information from B to be fed back to A, then start B by
> calling startActivityForResult. Then, when B exits, call setResult,
> and A will be on top of the Activity stack and its onActivityResult
> will fire.
>
> If you don't need information from B, then you can start B using
> startActivity. A will still be on top of the Activity stack when B
> exits.
>
> Best regards,
> Brian Cooley
>
> On May 17, 7:16 pm, ls02 <agal...@audible.com> wrote:
>
> > My understanding there is no way to start another activity reusing
> > existing activity instance. Both startActivity and
> > startActivityForResult create a new activity instance.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to