Hello everyone,

I am trying to display activities that were already created but are
currently in the background. The problem is that I use startActivity
or startSubActivity from the current activity to display them, which
will create a new instance of the background activity. When calling
finish on this new instance, I would want all instances of that
activity to be closed, which is not the case. I could use
launchMode="singleInstance" in the manifest file, but I don't like how
the transition is done between different activities (i.e., when
starting a new activity from my single instance one, an empty screen
is displayed, then the single instance activity is displayed again for
a couple of seconds, then the new (map) activity is shown -- this only
happens when displaying a map activity). If I don't use single
instance on my original activity, the transition is done smoothly.

I tried using an approach mentioned in a previous thread, where I
first have to get the task id for the activity and use that when
trying to bring it to the foreground, but I get the same task id for
every activity that I create. Single instance would have solved that
also, but as mentioned above, I dislike the screen transition
process.

It would have been nice to be able to get a list of all existing
(background) activities and close them manually, but I don't think
it's possible.

If I call finish() write after I start a new activity, an intermediate
screen appears before showing the new activity, which I dislike also.
I am implementing the whole onActivityResult concept, but this goes to
waits (at least in my case) when more than one instance of an activity
is running, since I want all instances to be closed when one is.
Hence, exiting the application has become more cumbersome.

How can I solve this problem?

Thank you,
Mihai
--~--~---------~--~----~------------~-------~--~----~
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
[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