2016-04-12 14 views

答えて

0

はあなた

public void getDeviceList(){ 
     BluetoothAdapter mBlurAdapter= BluetoothAdapter.getDefaultAdapter(); 
     Set<BluetoothDevice> pairedDevices = mBlurAdapter.getBondedDevices(); 
     if (pairedDevices.isEmpty()) { 
      Log.e("DeviceActivity ", 
        "Device not founds"); 
      return ; 
     } 

     for (BluetoothDevice devices : pairedDevices) { 
      Log.d("DeviceActivity", "Device : address : " + devices.getAddress() + " name :" 
        + devices.getName()); 
     } 
    } 

はまた、上記のコードは、ペアリングデバイスのリストが表示されます許可

+0

を定義するためにお見逃しなく助けとなることがあります。現在接続されているBluetoothデバイスのアドレスが必要です。 – Sainath

+0

http://stackoverflow.com/questions/12509135/how-to-get-bluetooth-connected-devices-using-bluetoothheadset-apiこれはあなたを助けるかもしれません –

関連する問題