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

super.onCreate(savedInstanceState);
                    setContentView(R.layout.activity_unlock);

                }



                public  void onClick_find(View v)  {  //비밀번호  찾기  버튼을  누르면
                    sender  =  new  GMailSender("safeguard.bicycle@gmail.com","dlsakrh1");  //
            메일  보내는  클래스  생성

                    timeThread();



                    Toast  toast_find  =  Toast.makeText(this,"입력하신  이메일로  비밀번호가  전송
            되었습니다.",Toast.LENGTH_SHORT);  //토스트(알림)설정
                    toast_find.show();  //토스트  출력

                }



                public  void timeThread()  {
                    dialog=new  ProgressDialog(this);
                    dialog=new  ProgressDialog(this);

                    dialog.setTitle("Wait...");
                    dialog.setMessage("메일을  보내는  중입니다.\n5초  정도  걸립니다.");

                    dialog.setIndeterminate(true);
                    dialog.setCancelable(true);
                    dialog.show();

                    new Thread(new  Runnable()  {
                        public  void run()  {

                            SharedPreferences              test      =      getSharedPreferences("test",
            MODE_PRIVATE);
                            try {

                                    sender.sendMail("[  자전거  잠금  비밀번호  ]",
                                         "안녕하세요.\n입력하셨던                        비밀번호는            [    "     +

            test.getString("PW",  "")  +  "  ]  입니다.",
                                        "safeguard.bicycle@gmail.com",
                                        test.getString("EM",  "")

                                    );
                            } catch(Exception  e) {





                                                         -  477  -
   479   480   481   482   483   484   485   486   487   488   489