12-07-2012 04:13 PM
Problem:
I could not get UUID from a String.
Purpose:
Connect to a bluetooth device by the following code
_bluetoothConnection = (StreamConnection) Connector.open(_url);
Sample code:
String _uuid = "00001101-0000-1000-8000-00805F9B34FB";
?? UUID = _uuid??
DiscoveryAgent mDiscoveryAgent = LocalDevice.getLocalDevice().getDiscoveryAgent();
String url = mDiscoveryAgent.selectService(_uuid,ServiceRecord.
_bluetoothConnection = (StreamConnection) Connector.open(_url);
Does anyone know how to get UUID from a String?
Thanks your attention,
12-10-2012 10:25 AM
String _uuid = "00001101-0000-1000-8000-00805F9B34FB";
int uuidint = _uuid.hashCode();
UUID deviceu = new UUID(uuidint);
Cheers,