문제

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