Page 210 - 3-1
P. 210

webView = (WebView) findViewById(R.id.webView);
                  }


                  public void MyToolButton(View v) {
                      Toast.makeText(getApplicationContext(), " 공구 목록으로 이동합니다.",


              Toast.LENGTH_LONG).show();//  텍스트 표시
                      //Intent myIntent = new Intent(Intent.ACTION_VIEW, Uri.parse


              ("http://192.168.0.24:8080/list.jsp"));// 링크로 이동
                      //startActivity(myIntent);
                      webView.loadUrl("http://192.168.0.27:8080/list.jsp");
                  }


                  public void BluetoothButton(View v) {
                      mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
                      bt = new Bluetooths(mBluetoothAdapter);
                      Rssi rssi = new Rssi();
                      //rssi.calculateDistance(3, RSSI);


                      mBluetoothAdapter.startLeScan(LeScne);
                  }


                  public void Rssi(View v) {
                      Rssi rssi = new Rssi();
                      System.out.println(BluetoothDevice.EXTRA_RSSI);
                      Toast.makeText(getApplicationContext(), "TEST", Toast.LENGTH_LONG).show();
                  }
                  public BluetoothAdapter.LeScanCallback LeScne = new BluetoothAdapter.LeScanCallback()
              {
                      @Override
                      public void onLeScan(BluetoothDevice device, int rssi, byte[] scanRecord) {
                          Log.d("HI", "LeScanCallback() - device=" + device + " (" + device.getName() + ")"
              + ",
              rssi=" + rssi);
                      }
                  };
              }







                                                         - 210 -
   205   206   207   208   209   210   211   212   213   214   215