I'm working on an application, using bluetooth to transfer file. I have a question about bluetooth discovering. How can i find other devices which already installed my application when bluetooth discovering? I knew I have to use UUID, and i also knew the BluetoothDevice can give me UUID from other devices. However, i don't know how to add my application's UUID into SDP for bluetooth discovering.

Thanks!!!

有帮助吗?

解决方案

On the server side, when you call the appropriate listen function, pass it the UUID.

On the client side, call startDiscovery() and listen for the discovered devices. For each device found, get the BluetoothDevice object and call getUUIDs() to get the UUIDs that the remote device implements. Check for a match with UUID.equals().

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top