views:

61

answers:

2

I am looking at UUID generation in Blackberrys.

I need to be able to generate 128 bit UUIDs from last generation Blackberrys.

I have just looked through the API and it looks like the javax.bluetooth.UUID class is the way to go. Can I assume that this API will be available for all Blackberrys? Is there another, more standard/better, way of generating 128 bit UUIDs from a Blackberry?

Edit: I also found this other class net.rim.device.api.synchronization. UIDGenerator. All I need to know is if this is available for all new Blackberries, since I'm not going to develop the app but require a 3rd party developing it to send me a 128 bit UUID.

A: 

The Bluetooth UUID class doesn't actually generated UUIDs, it's just a data representation of a UUID for Bluetooth purposes. I don't think there's a native API on the BlackBerry for actually generating UUIDs - you may need a third party library for that.

Marc Novakowski
A: 

UUIDs (depending on the definition) are usually just a hash sum of the current time and the hardware (MAC) address (as those are considered being unique) of a/the network device, e.g. bluetooth or WiFi devices. If you don't need to build UUIDs conforming with specific UUID algorithms but just need unique IDs, you could just roll your own easily. Otherwise it shouldn't be too hard to implement a standardized algorithm either.

Look here for some UUID algorithms: http://en.wikipedia.org/wiki/Universally_Unique_Identifier (there are also links to Java libraries for generating UUIDs)

jkramer