Page 447 - 2
P. 447

protected void onCreate(Bundle savedInstanceState) {
                   super.onCreate(savedInstanceState);
                   setContentView(R.layout.activity_location_check);


                   layout = (ConstraintLayout) findViewById(R.id.Checking_locationLayout);
                   textView_totaldistance = (TextView) findViewById(R.id.textView_totaldistance);
                   textView_totaltime = (TextView) findViewById(R.id.textView_totaltime);
                   Button startButton = (Button) findViewById(R.id.button_start);


                   startButton.setOnClickListener(new View.OnClickListener() {
                       @Override
                       public void onClick(View view) {
                          if(parsingdata != null){
                              Intent intent = new Intent(getApplicationContext(),MainActivity.class);
                              intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_T
            OP);
                              intent.putExtra("ParsingData",parsingdata);
                              startActivity(intent);
                          }
                       }
                   });

                   tmap = new TMapView(this);
                   tmap.setSKPMapApiKey("69e5f7cb-e294-3d25-8938-6e5e54d15c6d");
                   tmap.setLanguage(TMapView.LANGUAGE_KOREAN);
                   tmap.setMapType(TMapView.MAPTYPE_HYBRID);

                   layout.addView(tmap);


                   Intent intent = getIntent();
                   parsingdata = intent.getStringExtra("ParsingData");
                   Log.d("BluetoothManager"," 데이터받음 + " + parsingdata);

                   PrintMap(parsingdata);


               }

               android.os.Handler handler = new android.os.Handler() {
                   @Override
                   public void handleMessage(Message msg) {
                       super.handleMessage(msg);
                       switch (msg.what) {
                          case TOTAL_INFO_DISTANCE:
                              textView_totaldistance.setText((String) msg.obj);
                              break;
                          case TOTAL_INFO_TIME:
                              textView_totaltime.setText((String) msg.obj);
                              break;
                       }




                                                         - 447 -
   442   443   444   445   446   447   448   449   450   451   452