找回密码
 立即注册
mapAndroidclasssiwi | android开发 2022-10-28 48 0star收藏 版权: . 保留作者信息 . 禁止商业使用 . 禁止修改作品
//1.远程登录(用户名和密码超越3位长度则成功,在服务器可以自己设置代码)//2.富含loading作用(多线程管理,时势回来数据)//3.登录不成功可以提示犯错原因//4.保留登錄后的信息(如用戶名和密碼,可以自己設置)//5.具有超级完整详细的注释(新手也能看懂)//可以设置成自己的UI库//注意://1.需求设置androidManifest文件//lt;activityandroid:name=.IndexPageandroid:label=登入后的页面///gt;//lt;activityandroid:name=.Registerandroid:label=注册///gt;//lt;/applicationgt;//lt;uses-permissionandroid:name=android.permission.INTERNET/gt;01//2.需求编写一个服务器servlet代码02StringuserName=request.getParameter(userName);03Stringpassword=request.getParameter(password);04System.out.println(userName+-+password);05DataOutputStreamdos=newDataOutputStream(response.getOutputStream());06if(userName!=nullpassword!=null){07if(userName.length()gt;3password.length()gt;3){08dos.writeInt(16);09}else{10dos.writeInt(0);11}12}else{13dos.writeInt(0);14}15dos.flush();16dos.close();1//3.别望了配置web.xml(如果是jsp则可以不必配置)2//4.需求在Login.class中的内部类LoginFailureHandler的run方法中的validateURL(验证用户名和密码的URL)本资料共包括以下附件:
map\bin\fank\android\utils\HttpUtils.class
map\bin\siwi\map\android\IndexPage$1.class
map\bin\siwi\map\android\IndexPage.class
map\bin\siwi\map\android\Login$1.class
map\bin\siwi\map\android\Login$2.class
map\bin\siwi\map\android\Login$3.class
map\bin\siwi\map\android\Login$4.class
map\bin\siwi\map\android\Login$5.class
map\bin\siwi\map\android\Login$LoginFailureHandler.class
map\bin\siwi\map\android\Login.class
map\bin\siwi\map\android\R$attr.class
map\bin\siwi\map\android\R$drawable.class
map\bin\siwi\map\android\R$id.class
map\bin\siwi\map\android\R$layout.class
map\bin\siwi\map\android\R$string.class
map\bin\siwi\map\android\R.class
map\bin\siwi\map\android\Register$1.class
map\bin\siwi\map\android\Register$2.class
map\bin\siwi\map\android\Register$3.class
map\bin\siwi\map\android\Register.class
map\bin\classes.dex
map\bin\map.apk
map\bin\resources.ap_
map\gen\siwi\map\android\R.java
map\res\drawable\icon.png
map\res\layout\indexpage.xml
map\res\layout\login.xml
map\res\layout\main.xml
map\res\layout\register.xml
map\res\values\indexpage.xml

(//1. Remote login (if the user name and password exceed 3 digits, it is successful, and you can set the code on the server)//2. It is rich in loading functions (multi-threaded management, and the situation returns data)//3. If the login is unsuccessful, you can prompt the reason for the error//4. Keep the information after login (such as the user name and password, which can be set by yourself)//5. It has super complete and detailed comments (novices can also understand) //You can set it as your own UI library.//Notes://1. You need to set the androidManifest file//lt; Activityandroid: name=. IndexPageandroid: label=The page after login///gt// lt; Activityandroid: name=. Registerandroid: label=Register///gt// lt;/ applicationgt;// lt; uses-permissionandroid:name=android.permission.INTERNET/gt; 01//2. You need to write a server servlet code 02StringuserName=request. getParameter (userName); 03Stringpassword=request.getParameter(password); 04System.out.println(userName - password); 05DataOutputStreamdos=newDataOutputStream(response.getOutputStream()); 06if(userName!=nullpassword!=null){07if(userName.length()gt;3password.length()gt;3){08dos.writeInt(16);09}else{10dos.writeInt(0);11}12}else{13dos.writeInt(0);14}15dos.flush(); 16dos.close(); 1//3. Don't forget to configure web.xml (if it is a jsp, you don't need to configure it) 2//4. The requirements are in Login The validateURL (the URL to verify the user name and password) in the run method of the internal class LoginFailureHandler in the class. This material includes the following attachments:
map\bin\fank\android\utils\HttpUtils.class
map\bin\siwi\map\android\IndexPage$1.class
map\bin\siwi\map\android\IndexPage.class
map\bin\siwi\map\android\Login$1.class
map\bin\siwi\map\android\Login$2.class
map\bin\siwi\map\android\Login$3.class
map\bin\siwi\map\android\Login$4.class
map\bin\siwi\map\android\Login$5.class
map\bin\siwi\map\android\Login$LoginFailureHandler.class
map\bin\siwi\map\android\Login.class
map\bin\siwi\map\android\R$attr.class
map\bin\siwi\map\android\R$drawable.class
map\bin\siwi\map\android\R$id.class
map\bin\siwi\map\android\R$layout.class
map\bin\siwi\map\android\R$string.class
map\bin\siwi\map\android\R.class
map\bin\siwi\map\android\Register$1.class
map\bin\siwi\map\android\Register$2.class
map\bin\siwi\map\android\Register$3.class
map\bin\siwi\map\android\Register.class
map\bin\classes.dex
map\bin\map.apk
map\bin\resources.ap_
map\gen\siwi\map\android\R.java
map\res\drawable\icon.png
map\res\layout\indexpage.xml
map\res\layout\login.xml
map\res\layout\main.xml
map\res\layout\register.xml
map\res\values\indexpage.xml)

[下载]12244717254.rar




上一篇:Android手机通过wifi控制电脑程序源码
下一篇:Android代码调用C++代码