Page 199 - 3-1
P. 199

package org.intec.incheon.korea.project3_1_3;


              import android.app.AlertDialog;
              import android.bluetooth.BluetoothAdapter;
              import android.bluetooth.BluetoothDevice;
              import android.bluetooth.BluetoothGatt;
              import android.bluetooth.BluetoothGattCallback;
              import android.bluetooth.BluetoothSocket;
              import android.content.DialogInterface;
              import android.content.Intent;
              import android.os.Handler;
              import android.widget.Toast;


              import java.io.InputStream;
              import java.io.OutputStream;
              import java.util.ArrayList;
              import java.util.List;
              import java.util.Set;
              import java.util.UUID;


              /**
               * Created by jinwon
               */


              public class Bluetooths extends AppCompatActivity {




                  public void BluetoothButton(View v) {
                      Toast.makeText(MainActivity.getContext(), " 블루투스 상태를 확인합니다",


              Toast.LENGTH_LONG).show();//  텍스트 표시
                  }


                  static final int REQUEST_ENABLE_BT = 0;//   사용자 정의 함수로 블루투스 활성 상태의 변경
              결과를


              App 으로 알려줄때 식별자로 사용됨 보다 커야함(0                 )
                  static BluetoothGatt bg;
                  int mPariedDeviceCount = 0;
                  Set<BluetoothDevice> mDevices;



                                                         - 199 -
   194   195   196   197   198   199   200   201   202   203   204