Page 1007 - 3-2
P. 1007

private void selectDB(String username, String userpassword) {
                    class SelectData extends AsyncTask<String, Void, String> {
                        ProgressDialog loading;
                        @Override
                        protected void onPreExecute() {
                            super.onPreExecute();
                            loading = ProgressDialog.show(FindActivity.this, "Please Wait", null, true, true);
                        }
                        @Override
                        protected void onPostExecute(String s) {
                            super.onPostExecute(s);
                            loading.dismiss();


                            if(box.equals("1") || box.equals("2") || box.equals("3")) {
                                String msg = null;


                                switch(box) {
                                    case "1" : msg = "8"; break; //0b0011_1000
                                    case "2" : msg = "9"; break; //0b0011_1001
                                    case "3" : msg = ":"; break; //0b0011_1010
                                }


                                btService.write(msg);


                                deleteDB(box);
                            }
                            else Toast.makeText(getApplicationContext(),
                                    " 데이터가 존재하지 않습니다.",
                                    Toast.LENGTH_LONG).show();
                        }
                        @Override
                        protected String doInBackground(String... params) {


                            try {
                                String username = (String) params[0];
                                String userpassword = (String) params[1];


                                String link = "http://192.168.0.39/select.php";
                                String data = URLEncoder.encode("username", "UTF-8") + "=" +
                                            URLEncoder.encode(username, "UTF-8");
                                data += "&" + URLEncoder.encode("userpassword", "UTF-8") + "=" +
                                            URLEncoder.encode(userpassword, "UTF-8");


                                URL url = new URL(link);


                                                        - 1007 -
   1002   1003   1004   1005   1006   1007   1008   1009   1010   1011   1012