(Android remote login code instance with loading effect, about whether the server is successfully logged in in the background, [0] login status, [1] network error. You can learn many Android programming tips in the code, such as pop up dialog boxes, initialize the registration view component, clear the listening button, and check the registration form. Implementation keys: 1. Remote login (if the user name and password exceed 3 bits, it is successful, and you can set the code on the server) 2. It contains the loading effect (multi-threaded management, and the data returned by the situation) 3. If the login is unsuccessful, you can prompt the reason for the error 4. Save the information after login (such as the user name and password, you can set them yourself) Note: 1. You need to set the androidManifest file 2. You need to write a server servlet code 3. Don't look at configuring web.xml (If it is a jsp, you do not need to configure it) 4. The requirements are in Login The validateURL in the run method of the internal class LoginFailureHandler in class detects the user's login. The server uses the dos of DataOutputStream writeInt(int); To determine whether the login is successful (if the server returns intgt; 0, the login is successful; otherwise, the login fails). After the login is successful, determine whether to save the password according to isRememberMe (the user name will be saved). If the connection to the server lasts more than 5 seconds, the connection is also considered as a failure)