Page 140 - 3-2
P. 140

protected void onPostExecute(Void aVoid) {
                        //display block
                        if(success){
                            String stringBlock = "";
                            for(int i=0; i<numOfSector; i++){
                                stringBlock += i + ":\n";
                                for(int j=0; j<numOfBlockInSector; j++){
                                    for(int k=0; k<MifareClassic.BLOCK_SIZE; k++){
                                        stringBlock += String.format("%02X", buffer[i][j][k] & 0xff) + " ";
                                    }
                                    stringBlock += "\n";
                                }
                                stringBlock += "\n";
                            }
                        }else{
                        }
                    }
                }
                /////////////////////////////////////////////////////////////////////////////////////////////////////////////NFC  카드
            값을 데이타베이스에 저장
                class SigninActivity_codeget extends AsyncTask<String, String, String> {
                private TextView statusField;


                //flag 0 means get and 1 means post.(By default it is get.)
                public SigninActivity_codeget(Context context,TextView statusField) {
                    this.statusField = statusField;
                }


                        @Override
                        protected String doInBackground(String[] arg0) {


                            try{
                                String code = (String)arg0[0];
                                Log.d(" 여긴가 code:", code);
                                String link = "http://192.168.0.85/code_get.php?code=" + code;


                                URL url = new URL(link);
                                Log.d(" 여긴가", "6");


                                HttpURLConnection                        urlConnection                      =
            (HttpURLConnection)url.openConnection();
                                Log.d(" 여긴가", "6-1");
                                BufferedReader          in        =          new          BufferedReader(new
            InputStreamReader(urlConnection.getInputStream()));
                                Log.d(" 여긴가", "6-2");


                                                         - 140 -
   135   136   137   138   139   140   141   142   143   144   145