Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android log in/sign-up sample project

Tags:

android

Is there a reference sample project to implement a log in/sign-up welcome screen in Android?

I have thought about what I would need to know to do this:

  • Activity layout
  • Text field validation
  • Text field hints
  • Enabling/disabling UI elements (i.e. press login only if data has been entered)
  • Async network request validating credentials
  • Blocking UI waiting for login
  • Forwarding to next activity based on login result
  • Sign-up interlude if 1st time user
  • Cancelling network login if the user wants (do not crash on call-back if user moves away from Activity)
  • Saving user data, access token if available otherwise password (and encrypt it)
  • Transition animations, including "access denied" feedback
  • Use cached credentials if available
  • Login "remember me" opt-out
  • etc.

Many more bullet point to write down, but you get the idea.

I suspect, correct me if I am wrong, that many apps may have (or even start in) a login/signup screen. Probably there is a customisable Eclipse project somewhere which captures most best practices so that devs don't reinvent the wheel much?

Clearly, many apps will want to do things differently. Clearly, for some cases the above is nonesense. But.. maybe for some apps this is a reasonable "typical" login Activity?

like image 923
Robottinosino Avatar asked Dec 06 '22 08:12

Robottinosino


1 Answers

The latest version of the Android Development Tools (ADT) plugin for Eclipse has a wizard to create a new LoginActivity that can be a good starting point. It has the following features.

  • Activity layout Text field validation
  • Text field hints
  • Enabling/disabling UI elements
  • Async request validating credentials
  • Blocking UI waiting for login
  • Cancelling login
  • etc.

It's in File -> New -> Other -> Android Activity -> LoginActivity

like image 87
rubenlop88 Avatar answered Dec 08 '22 22:12

rubenlop88