A couple of things to keep in mind:

First, launcher icons are simply shortcuts to intents, and these intents 
point to specific activities, not to your app as a whole. In the case of 
your "main" launcher icon, the one in the app drawer, the target activity is 
the one in your manifest with this intent filter:

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>

In your case, I'm guessing that's the LoginActivity. What you probably need 
to do is insert a check in its onCreate() method to reopen the 
BrowseActivity if the user's already logged in. Something like:

    if (loggedIn) {
        startActivity(new Intent(this, BrowseActivity.class));
        finish();
    }

It may seem like "a huge hack", but it's not really, not in the context of 
launcher intent shortcuts.

Second, keep in mind that the activity *stack* is exactly that - a stack of 
the recently-opened activities in your app. By default, opening an activity 
simply adds it to that stack, on top of whatever was already there. If you 
want different behavior, look at the stack-control intent flags (
http://developer.android.com/guide/topics/fundamentals/tasks-and-back-stack.html
).

String

-- 
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]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to