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

Ⅳ.  CodeVision  Source  Code






                  Object  input  =  null;


                  SharedPreferences mPref  = null;

                  Boolean  realtime  =  false;


                  Handler  mHandler  =  null;


                  String  hostname = null;

                     private  int  PORT  =  7777;
                  String  data_out = "";



                  Socket  socket;


                  BufferedReader  networkReader  =  null;
                     BufferedWriter  networkWriter  =  null;



                  @Override
                  protected  void  onCreate(Bundle  savedInstanceState)  {
                        super.onCreate(savedInstanceState);

                             setContentView(R.layout.activity_main);


                        if  (NetworkUtil.getConnectivityStatus(getApplicationContext())  ==  0)  {
                             AlertDialog.Builder alert = new AlertDialog.Builder(MainActivity.this);
                             alert.setPositiveButton("확인",  new  DialogInterface.OnClickListener()  {

                                  @Override
                                  public  void onClick(DialogInterface dialog,  int which)  {
                                        Intent  intent  =  new  Intent(Settings.ACTION_WIFI_SETTINGS);

                                        startActivity(intent);
                                        finish();
                                  }
                             });
                                     alert.setMessage("네트워크에  연결되지  않았습니다.");

                             alert.show();
                        }






                                                                                               정보통신기기과
                                                         -  797  -
   799   800   801   802   803   804   805   806   807   808   809