Hi Mark, thank you very much for your reply.

I have some more findings to report!  Turns out it's not just
launching it from Eclipse that causes this behavior, but also
downloading the apk from the Android web browser, installing it, and
tapping the launch button.

I set up a basic hello world app, uploaded it to my site, downloaded
it on my G1, installed it, hit the Launch button after it said the
install was successful, and it opened the app, showing the root
activity.  I then hit the Home button, and re-opened the app.  It
opened and showed the root activity, but then I hit the back button,
and it showed the same root activity that was previously instantiated
when it first launched.

I have not tried this with downloading an app from the Android Market,
but I would say that this is a bug in Android that should be fixed,
specifically in its package installer, or perhaps just in launching an
app in general right after installing it.  Anyway, thank you again for
your contributions, and if you have anything else to add to my
observations I'd be more than glad to hear it!

Best,
Zack



On Apr 8, 6:44 pm, Mark Murphy <mmur...@commonsware.com> wrote:
> UBZack wrote:
> > I did a little poking around and I think I can DEFINITELY shine some
> > light on this.
>
> > Basically, I think the difference lies in the way Eclipse ports the
> > apk to the emulator and launches it.
>
> <lengthy detailed analysis snipped>
>
> > It seems that eclipse ports the app to the emulator in such a way that
> > each successive launch that is made while the app is running pushes
> > another instance of the app onto the stack, unless you hit the back
> > button before relaunching.
>
> I don't use Eclipse. If I understand correctly, from this post and
> others, is that when you run the application from Eclipse, you are taken
> right to the initialactivityof that application, bypassing the home
> screen and launcher.
>
> In that case, what may be happening is that Eclipse tells the emulator
> to launch the rootactivity...and specifies FLAG_ACTIVITY_NEW_TASK and
>  FLAG_ACTIVITY_MULTIPLE_TASK on the launching Intent. That would provide
> the behavior you're experiencing, if I understand correctly.
>
> > Any light that you guys can shine on this would help a lot, and well
> > done on providing very helpful examples and suggestions
>
> Clearly, Eclipse is part of a broader Hulu-led initiative to "turn our
> chunky brain matter into creamy goo". ;-)
>
> > Mark, you've been quite a legend on this forum!
>
> Legend? I hope not. Legends are frequently rather dead.
>
> But, thanks!
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android App Developer Training:http://commonsware.com/training.html
--~--~---------~--~----~------------~-------~--~----~
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