Android Bluetooth Connection - Service Discovery Failed

后端 未结 7 1249
情深已故
情深已故 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:04

    You'll have to provide a valid UUID for the service discovery.

    BluetoothSocket sock = bdevice.createRfcommSocketToServiceRecord(VALID_UUID);
    

    There are several common UUIDs for various standard (default) bluetooth services (Handsfree, File transfer, etc).

    See here

提交回复
热议问题