Вопрос

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