Don't use singleTask or singleInstance, because that will cause your
overall activity flow to be broken up into separate tasks for each
activity where this intermediate goes.

There really isn't a way to do exactly what you want.

On Jun 24, 1:06 am, Gavin Bong <[EMAIL PROTECTED]> wrote:
> I have a need to intersperse the flow between one Activity to another
> with an intermediate Activity.
>
> Let's call the intermediate activity INTERMEDIATE.
>
> So imagine my application having a normal activity flow like this:
>
> A -> B -> C -> D
>
> Now putting the intermediary activity into the flow, we get:
>
> A -> INTERMEDIATE -> B -> INTERMEDIATE -> C -> INTERMEDIATE -> D
>
> When the user presses the BACK button starting from D, it will go
> directly to C.
> i.e. the INTERMEDIATE activity only appears in the forward direction.
>
> Basically INTERMEDIATE will transition between foreground & background
> many times
> throughout the lifetime of the app.
>
> A summary of my requirements:
>
> 1) The INTERMEDIATE activity should NOT die unless the initial launch
> activity A exits.
>     i.e. I only have an "exit" menu item in A.
>
> 2) I need to be able to change the contents displayed by INTERMEDIATE
> during a transition.
>    i.e. From A -> B, I will need the properties of INTERMEDIATE: (2.1)
> the displayed content. (2.2) the "next" activity to progress to
> (activity B). This applies to the other forward transitions.
>
> My idea:
>
> 3) Store the "states" in a service. And in INTERMEDIATE's onResume() I
> can query the service
> for both (2.1) and (2.2) and change it accordingly.
> 4) I still don't know which of the launch modes to use for
> INTERMEDIATE.
> Based on the docs; it's between singleTask and singleInstance. However
> I don't understand the concept of "Tasks" as described in the doc:
>
> e.g.
>
> Only allow one instance of this activity to ever be running. This
> activity gets a unique task with only itself running in it; if it is
> ever launched again with the same Intent, then that task will be
> brought forward and its onNewIntent(Intent) method called. If this
> activity tries to start a new activity, that new activity will be
> launched in a separate task.
>
> Any help would be much appreciated.
>
> Thanks
>
> Gavin
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to