Search code examples
android-activityandroid-intentlauncher

Which activity should come up first? defined as launcher?


If I have a login screen and then the activity which displays the main functionality of my application.

Which one should be deemed as the default=launcher activity?

Should I have the login screen as launcher which will be skipped if the username/password exist in the preferences? Or should I have my Main activity as a launcher which should start the login activity if no user/password are present?

I have found the following google guiding lines: http://developer.android.com/guide/practices/design/seamlessness.html

Look at the title: Don't Overload a Single Activity Screen

I am not sure that I have understood it correctly, but if I did, then it means that the login screen should be the launcher screen.

Am I correct? What do you suggest?


Solution

  • this is a common sense what to do.

    On successfully login save username and password in sqlite database or save in SharedPreferences. and check data allready exist in side oncreate() method og Login Activity

    if username and password exist in SharedPreferences or sqlite database. start your activity in which you have main functionality.