BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 06-13-2008, 05:21 AM   #1
omrib
Knows Where the Search Button Is
 
Join Date: Apr 2008
Model: 8800
PIN: N/A
Carrier: Orange
Posts: 26
Default generate GUID or UUID

Please Login to Remove!

Hey everyone

I wanted to ask how can i generate a 128bit UUID or GUID on the blackberry.
i have been looking in the API's and didnt find anything
Offline  
Old 06-13-2008, 10:15 AM   #2
richard.puckett
Talking BlackBerry Encyclopedia
 
richard.puckett's Avatar
 
Join Date: Oct 2007
Location: Seattle, WA
Model: 9020
PIN: N/A
Carrier: T-Mobile
Posts: 212
Default

It's available via the net.rim.device.api.synchronization.UIDGenerator class.
__________________
Do your homework and know how to ask a good question.
Offline  
Old 06-13-2008, 11:25 AM   #3
omrib
Knows Where the Search Button Is
 
Join Date: Apr 2008
Model: 8800
PIN: N/A
Carrier: Orange
Posts: 26
Default

This only generate and integer or a long as the UID.
I'm talking about a 128bit one.

anything else? recommendations?
Offline  
Old 06-13-2008, 11:53 AM   #4
richard.puckett
Talking BlackBerry Encyclopedia
 
richard.puckett's Avatar
 
Join Date: Oct 2007
Location: Seattle, WA
Model: 9020
PIN: N/A
Carrier: T-Mobile
Posts: 212
Default

When I looked into it the closest thing I could find to UUIDs was the UIDGenerator, which was sufficient for my needs. I haven't seen anything in the APIs since then that would indicate that full UUIDs implementations are available.

There are some implementations on the web, such as this one which even has a good license. At least it's a common algorithm so, if nothing else, you might just have to find an existing impl and port it over.
__________________
Do your homework and know how to ask a good question.
Offline  
Old 06-17-2008, 10:23 AM   #5
roryf
New Member
 
Join Date: May 2008
Model: 8130
PIN: N/A
Carrier: T-Mobile
Posts: 9
Default

You can use the MD5Digest class create a hash and then hex encode it, wouldn't that do it?
Offline  
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


OEM Dell 3310 2 in 1 LCD Touch Screen D2TNH NV133FHM-T00 06GHX8 picture

OEM Dell 3310 2 in 1 LCD Touch Screen D2TNH NV133FHM-T00 06GHX8

$54.00



OEM Dell XPS 8910 8920 8930 Alienware Aurora R5 R6 R7 Front Cooling Fan 7M0F5 picture

OEM Dell XPS 8910 8920 8930 Alienware Aurora R5 R6 R7 Front Cooling Fan 7M0F5

$13.81



OEM Dell Precision M3800 XPS 15.6

OEM Dell Precision M3800 XPS 15.6" 15-9530 CPU Left Fan 2PH36 NIA01 DC28000DQF0

$9.99



Dell OEM Latitude Rugged Extreme 7404 Ribbon Cable for ExpressCard Cable G52B00 picture

Dell OEM Latitude Rugged Extreme 7404 Ribbon Cable for ExpressCard Cable G52B00

$9.95



Genuine OEM Dell 2375 B2375dnf B2375dfw 110V Fuser fixing N41P2 sku 724-BBCI picture

Genuine OEM Dell 2375 B2375dnf B2375dfw 110V Fuser fixing N41P2 sku 724-BBCI

$94.99



DELL 330-6581 3306581 725-10229 OEM LAMP FOR 1510X 1610HD 1610X  - Made By DELL picture

DELL 330-6581 3306581 725-10229 OEM LAMP FOR 1510X 1610HD 1610X - Made By DELL

$39.98







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.