Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
Posts: 41
Registered: ‎11-10-2008
My Device: Not Specified

how to generate GUID?

how can i generate a globally unique indentifier? Thanks.
Developer
Posts: 5,339
Registered: ‎09-20-2008
My Device: ***
My Carrier: ***

Re: how to generate GUID?

Use the combination of device pin (can be obtained via DeviceInfo class) and

 

net.rim.device.api.synchronization.UIDGenerator class.

Developer
Posts: 78
Registered: ‎05-17-2012
My Device: 9900 - OS 7.0 Torch device
My Carrier: Reliance

Re: how to generate GUID?

Hi

 

You mean UUID is combination DeviceInfo.getDeviceId+ LongValue (net.rim.device.api.synchronization.UIDGenerator).

 

is it rt ?

Developer
Posts: 209
Registered: ‎04-30-2011
My Device: BlackBerry Z10
My Carrier: Airtel

Re: how to generate GUID?

Hi

 

      // To get the UUID of Device.
        public static String getUUID()
        {          
                int deviceID = DeviceInfo.getDeviceId();
                UUID u = new UUID(deviceID);
                String uuid= u.toString();

                return uuid
                +"-"+Integer.toString(UIDGenerator.getUID()).substring(4,8)
                +"-"+Integer.toString(UIDGenerator.getUID()).substring(4,8)
                +"-"+Integer.toString(UIDGenerator.getUID()).substring(3,7)
                +"-"+Long.toString(System.currentTimeMillis()).substring(0,12); 
        }

 

Pawan

 

New Developer
Posts: 12
Registered: ‎06-14-2012
My Device: Curve 8900
My Carrier: Three

Re: how to generate GUID?

use this

 

http://www.uuidgenerator.net/

 

i have try it using version 1 UUID

New Member
Posts: 1
Registered: ‎06-24-2014
My Device: Blackberry z10
My Carrier: Blackberry

Re: how to generate GUID?

[ Edited ]

Hi,

You can use Guid Generator for generate GUIDs.:Punk:

 

 


lancastro1416 wrote:
how can i generate a globally unique indentifier? Thanks.



Moderator
Posts: 3,935
Registered: ‎06-26-2013
My Device: Curve 8520
My Carrier: Virgin Media (Mobile)

Re: how to generate GUID?

This topic has now been closed as it has been dormant for some time.

 

If you have any questions around this topic please feel free to start a new one :smileyhappy:

 

Thank you all for your participation!

 

Steve_T                                                                                                       New to the Community click here  
Community Moderator
Likes2.png    AS3.png    CG2.png