Page 242 - MDP2020-1
P. 242

|    인천전자마이스터고등학교  ·············································································································
            236

                                                            }  catch  (JSONException  e)  {
                                                                    e.printStackTrace();
                                                            }
                                                    }

                                            };
                                            LoginRequest  loginRequest  =  new  LoginRequest(  userID,  userPass,
            responseListener  );
                                            RequestQueue  queue  =  Volley.newRequestQueue(  LoginActivity.this  );

                                            queue.add(  loginRequest  );
                                    }
                            });
                    }


                    @Override

                    public  void  onBackPressed()  {
                            //super.onBackPressed();
                            backPressCloseHandler.onBackPressed();
                    }

            }


            <  로그인  리퀘스트  >


            import  com.android.volley.AuthFailureError;
            import  com.android.volley.Response;

            import  com.android.volley.toolbox.StringRequest;


            import  java.lang.reflect.Method;
            import  java.util.HashMap;
            import  java.util.Map;



            public  class  LoginRequest  extends  StringRequest  {


                    //서버  URL  설정(php  파일  연동)
                    final  static  private  String  URL  =  "http://mdphost.dothome.co.kr/Login.php";

                    private  Map<String,  String>  map;


                    public  LoginRequest(String  userID,  String  userPassword,  Response.Listener<String>
            listener)  {
                            super(Method.POST,  URL,  listener,  null);



                            map  =  new  HashMap<>();
   237   238   239   240   241   242   243   244   245   246   247