[android-developers] Main Activity Launches On Stack Every Time Home Screen Icon Is Clicked

2011-04-10 Thread Tony Chuinard
My application consists of a LoginActivity followed by a
BrowseActivity.  When the user hits the Browse Activity, then hits the
Home button, then hits the application icon again, the LoginActivity
relaunches (but they're already logged in and in the browse activity
so they should be there).

However, if I hit back, the BrowseActivity is still there, and the
LoginActivity is revisible when I hit back twice.  It seems like the
LoginActivity gets pushed to the top of the stack and displayed every
time the application is launched, but the docs say that the last
activity from that 'task' will be launched (which is what I want - a
return to the BrowseActivity).

I have a static LoginManager class, so I could check if that data is
null or not in LoginActivity onCreate() and do a finish() if
necessary, but I feel like that's a huge hack when my application
should be behaving like this already.

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


Re: [android-developers] Main Activity Launches On Stack Every Time Home Screen Icon Is Clicked

2011-04-10 Thread TreKing
On Sat, Apr 9, 2011 at 1:14 AM, Tony Chuinard tony.chuin...@gmail.comwrote:

  the docs say that the last activity from that 'task' will be launched
 (which is what I want - a return to the BrowseActivity).


Yeah, that should be the case. Post more details, any flags you've specified
in your manifest, phone model, and android version you're working on. See if
there's a bug report on b.android.com.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

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