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


Thread Tools

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


Genuine Dell OEM G Series G7 7790 CPU and Graphics Heatsink Assembly XRF05 picture

Genuine Dell OEM G Series G7 7790 CPU and Graphics Heatsink Assembly XRF05

$20.30



OEM Dell latitude E7250 CPU Cooling Fan with Heatsink DP/N 04T1K3 0J3M4Y picture

OEM Dell latitude E7250 CPU Cooling Fan with Heatsink DP/N 04T1K3 0J3M4Y

$13.90



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



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

$12.11



1PCS NEW FIT FOR OEM Dell AC Adapter Dell Alienware DA330PM190 LA330PM190 330W picture

1PCS NEW FIT FOR OEM Dell AC Adapter Dell Alienware DA330PM190 LA330PM190 330W

$117.97



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.