Android Login - Best implementation

Posted by perdian on Stack Overflow See other posts from Stack Overflow or by perdian
Published on 2010-06-02T10:45:41Z Indexed on 2010/06/02 12:53 UTC
Read the original article Hit count: 153

Filed under:
|
|

Hi everybody,

I'm planning to implement an Android application that requires a login screen.

If the user opens the activity something like this should happen:

  1. If user is logged in, goto 3
  2. If user is not logged in open the login screen and perfom login
  3. Show my application content

So, what's the "correct" way of implementing a login?

  1. Implement a StartActivity that perfoms the check if the user is logged in, implement a LoginActivity that implements the logging and an ApplicationActivity that actually implements the application logics?
  2. Implement just one Activity and handle the login by using multiple views which I show according to the application state?

Are there any examples or tutorials for this scenario?

© Stack Overflow or respective owner

Related posts about android

Related posts about mobile