Android Bluetooth Connection - Service Discovery Failed

后端 未结 7 1203
情深已故
情深已故 2020-12-17 00:08

I\'m trying to create a basic bluetooth application, for testing the device.

I got the code from developer.android. Here is the link : http://developer.android.com/

相关标签:
7条回答
  • 2020-12-17 01:15

    The following code snippet works for me. Try it...

    BluetoothDevice mmDevice;
    boolean temp = mmDevice.fetchUuidsWithSdp();
    UUID uuid = null;
    if( temp ){
    uuid = mmDevice.getUuids()[0].getUuid();
    }
    tmp = device.createRfcommSocketToServiceRecord(uuid);
    
    0 讨论(0)
提交回复
热议问题