Page 323 - 완) I MDP 프로젝트 작품 보고서(전체과 1학년)1.6
P. 323

인천전자마이스터고                                                                            전자회로설계과





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

            while((line  =  reader.readLine())  !=  null)
            {
            sb.append(line);
            break;
            }
            return  sb.toString();
            }
            catch(Exception  e){
            return  new  String("Exception:  "  +  e.getMessage());
            }
            }
            }


            InsertData  task  =  new  InsertData();    //쓰레드생성
            ask.execute(pw);    //쓰레드시작
            '7d




            private  void  sendSMS(String  phoneNumber,  String  message){

            String  SENT  =  "SMS_SENT";
            String  DELIVERED  =  "SMS_DELIVERED";



            //  문자보내는상태를감지하는endingIntent
            PendingIntent  sentPI  =  getBroadcast(this,  0,  new  Intent(SENT),  0);
            //  문자받은상태를감지하는endingIntent
            PendingIntent  deliveredPI  =  getBroadcast(this,  0,  new  Intent(DELIVERED),  0);


            //                //  문자보내는상태를감지하는endingIntent
            /  문자보내는상태를감지하는roadcastReceiver를등록한다
            registerReceiver(new  BroadcastReceiver()  {


            //  문자를수신하면  발생
            @Override
            public  void  onReceive(Context  context,  Intent  intent)  {
            switch  (getResultCode())  {
            case  Activity.RESULT_OK:
            Toast.makeText(getBaseContext(),  "인증문자가발송되었습니다",  Toast.LENGTH_SHORT).show();
            break;
            case  SmsManager.RESULT_ERROR_GENERIC_FAILURE:
            Toast.makeText(getBaseContext(),  "Generic  failure",  Toast.LENGTH_SHORT).show();
            break;



                                                         -  316  -
   318   319   320   321   322   323   324   325   326   327   328