Hi,

it seems that i have the same problem:
First I start my application.
A BroadcastReceiver launches the same activity so the intent has the
flag Intent.FLAG_ACTIVITY_NEW_TASK
but now i got the same launched activity twice
How can I finish the task root ? or bring back the root task to
foreground from the BroadcastReceiver ?

Thanks.

On 20 mar, 18:05, Dianne Hackborn <hack...@android.com> wrote:
> Um, what you are requesting is the normal behavior.  When you tap on an
> app's icon in home, it brings the current task of that app to the foreground
> if it is already running.
>
> And services are singletons so you can only every get a single instance of a
> service running.
>
>
>
> On Tue, Mar 17, 2009 at 2:26 AM, Derek <cram.de...@gmail.com> wrote:
>
> > Hi,
>
> > Is it possible to re-use all the instances of Activities and Services
> > when an application is launched twice. For instance:
> > 1/ I start my application APP1. Some activities are launched and a
> > service is started.
> > 2/ I click "Home" device button
> > 3/ I can see the icon the launch again my application APP1
> > 4/ I click on it and the APP1 is launched twice
>
> > I would like to re-use the existing the instances of Activities and
> > Services from the first launch.
> > I guess it is related to "SingleTop" or "SingleTask" but it doesn't
> > seem to work.
>
> > Any suggestion ?
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support.  All such questions should be posted on public
> forums, where I and others can see and answer them.

--~--~---------~--~----~------------~-------~--~----~
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