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

Native Development

Reply
Developer
Posts: 813
Registered: ‎05-29-2012
My Device: see later
My Carrier: see later

how to get device uuid?

hpow can I in c++ coding, get the unique device identifier?

 

keep finding it for webworks..need native

Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: how to get device uuid?

You can use the  HardwareInfo class...

 

http://developer.blackberry.com/native/reference/cascades/bb__device__hardwareinfo.html#property-har...


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 813
Registered: ‎05-29-2012
My Device: see later
My Carrier: see later

Re: how to get device uuid?

do i need permission for anything?

imei () does it?
Developer
Posts: 813
Registered: ‎05-29-2012
My Device: see later
My Carrier: see later

Re: how to get device uuid?

https://developer.blackberry.com/native/reference/cascades/quuid.html

i think i need this class, as i need uuid..
but no function to get uuid?
i need uuid..not imei..or hardwareid
Developer
Posts: 813
Registered: ‎05-29-2012
My Device: see later
My Carrier: see later

Re: how to get device uuid?

if i do this QUuid::createUuid().toString() everytime it generates a new uuid..
uuid should be unique for every blackberry device..and i shouldnt generate it all time.

how can i get uuid for device? no get function instead of create?
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: how to get device uuid?

Because that is a class for creating UUID's!


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 813
Registered: ‎05-29-2012
My Device: see later
My Carrier: see later

Re: how to get device uuid?

any class to get uuid then?

the class u gave hardwareinfo doesnt have getuuid
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: how to get device uuid?

To just identify the device you can use IMEI or pin in the class I gave you above, you will need to set the device identifying permission.


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 813
Registered: ‎05-29-2012
My Device: see later
My Carrier: see later

Re: how to get device uuid?

the problem is that the permission can be manually disabled by the user..

and it says if permission not alloed i get imei 0..
Developer
Posts: 1,524
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

Re: how to get device uuid?

Another trick I'm using is generating the GUID once and storing it in application settings. When the app starts, check if it's present, and if it is, just use the same GUID. Of course, it won't survive between reinstalls (unless it's stored in shared/ folder, where it can be manually deleted by user).

Andrey Fidrya, @zmeyc on twitter