Page 1009 - 3-2
P. 1009

protected void onPostExecute(String s) {
                            super.onPostExecute(s);
                            loading.dismiss();
                            Toast.makeText(getApplicationContext(), " 잠시만 기다려주세요",
                                             Toast.LENGTH_LONG).show();
                            btService.stop();
                            finish();
                        }
                        @Override
                        protected String doInBackground(String... params) {
                            try {
                                String numb = (String) params[0];


                                String link = "http://192.168.0.39/delete.php";
                                String data = URLEncoder.encode("boxnum", "UTF-8") + "=" +
                                                    URLEncoder.encode(numb, "UTF-8");


                                URL url = new URL(link);
                                URLConnection conn = url.openConnection();


                                conn.setDoOutput(true);
                                OutputStreamWriter wr =
                                                    new OutputStreamWriter(conn.getOutputStream());


                                wr.write(data);
                                wr.flush();


                                BufferedReader reader = new BufferedReader
                                                    (new InputStreamReader(conn.getInputStream()));


                                StringBuilder sb = new StringBuilder();
                                String line = null;


                                // Read Server Response
                                while ((line = reader.readLine()) != null) {
                                    sb.append(line);
                                    break;
                                }


                                return sb.toString();


                            } catch (Exception e) {
                                Log.d(this.getClass().getName(), "Exception: " + e.getMessage());
                                return new String("Exception: " + e.getMessage());
                            }


                                                        - 1009 -
   1004   1005   1006   1007   1008   1009   1010   1011   1012   1013   1014