Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Device unique identifier or mac address

Discussion in 'BlackBerry' started by McKrackeN, Oct 18, 2013.

  1. McKrackeN

    McKrackeN

    Joined:
    Oct 28, 2009
    Posts:
    51
    Hi all!

    We have a problem accessing the device unique identifier or the mac address in BlackBerry devices. Both returns an empty string. Is this a bug that we have to report?

    Thanks!
     
  2. AlexThibodeau

    AlexThibodeau

    Unity Technologies

    Joined:
    Jul 23, 2013
    Posts:
    309
    Yes please submit that as a bug. That should be working and would need to be looked into if it is not.
     
  3. Jonny-Roy

    Jonny-Roy

    Joined:
    May 29, 2013
    Posts:
    666
    Is there an ETA on this issue, I'm using the latest version of Unity and the unique Id still appears to be blank.

    Thanks,

    Jon
     
  4. AlexThibodeau

    AlexThibodeau

    Unity Technologies

    Joined:
    Jul 23, 2013
    Posts:
    309
    Do you have the case number for the bug report handy?
     
  5. Jonny-Roy

    Jonny-Roy

    Joined:
    May 29, 2013
    Posts:
    666
    Alas no, McKrackeN logged the issue I assumed following your comment above, but ultimately you just use:

    SystemInfo.deviceUniqueIdentifier

    And it's empty...I can log a bug if you like though?

    Thanks,

    Jon
     
  6. Jonny-Roy

    Jonny-Roy

    Joined:
    May 29, 2013
    Posts:
    666
    Oh, I've found a thread relating to this and apparently it's an issue blackberrys end... :(
     
  7. Jonny-Roy

    Jonny-Roy

    Joined:
    May 29, 2013
    Posts:
    666
  8. AlexThibodeau

    AlexThibodeau

    Unity Technologies

    Joined:
    Jul 23, 2013
    Posts:
    309
    Ah, that's the problem. In the "other settings" section of the player settings there is a checkbox for "Device Identification". This will add the permission setting for asking/obtaining the unique HW identifier for the phone. We do not have this enabled by default it is an "opt in" feature. :)
     
  9. Jonny-Roy

    Jonny-Roy

    Joined:
    May 29, 2013
    Posts:
    666
    Hi Alex,

    I can confirm this is definitely an issue with Unitys implementation.

    SystemInfo.deviceUniqueIdentifier return a two character string which is Unicode and is consistent. What I think is happening is Unity is parsing deviceinfo_identifying_details_get_pin(..); return value as a 2 Unicode string, but it's represented by BlackBerry as a hex string.

    deviceinfo_identifying_details_get_pin(..); does return an int, which is then normally converted using QString::number(pinValue, 16); I've successfully wrote a plugin which returns the pin correctly if you want the source code, the returned value matches the format shown in the blackberry settings.

    Incidentally if you get the bytes of the SystemInfo.deviceUniqueIdentifier, I don't think they match the original pin, so I think something is getting lost.

    Thanks,

    Jon
     
  10. TuesdayNinja

    TuesdayNinja

    Unity Technologies

    Joined:
    Apr 23, 2013
    Posts:
    17
    Jonny -

    Did you file a bug? If so, could you PM me the number? Just want to make sure it doesn't get lost in the shuffle.

    If you didn't, could you do so? I've tried to repro this by attaching

    Code (csharp):
    1. Debug.Log(SystemInfo.deviceUniqueIdentifier);
    to a GUIButton but I'm only getting McKracken's error (blank output). I'd be very interested to see how you got the characters; it could help us solve this puppy.

    Thanks,
     
  11. Extrawurst

    Extrawurst

    Joined:
    May 22, 2013
    Posts:
    43
  12. Jonny-Roy

    Jonny-Roy

    Joined:
    May 29, 2013
    Posts:
    666
    Hi Adam, I'll go one better I'll file a bug report with not only the code to show you the chars, but also one that includes my plugin to get the actual device Id so you can be sure when it's working as expected. By the way the chars will not come out in a GUI control or in the debug.Log as they come out as high end Unicode that just display as odd blobs...but they appear as blanks in the GUI / Debug. So you have read the chars and output the byte values instead to see something is actually in there.
     
  13. AlexThibodeau

    AlexThibodeau

    Unity Technologies

    Joined:
    Jul 23, 2013
    Posts:
    309
    Yep this was indeed broken. I've found a fix for this. I'll let you all know when I know which release this fix is going to be in.
     
  14. sumitsharma

    sumitsharma

    Joined:
    Oct 30, 2013
    Posts:
    15
    Here by these methods you can find Mac Address on your BlackBerry:

    From the home screen, select Setup > Options > Device > Device and Status Information.
    The WLAN MAC field displays the MAC address for the smartphone.
     
  15. Extrawurst

    Extrawurst

    Joined:
    May 22, 2013
    Posts:
    43
    Nice, So you suggest I prompt my customers to copy/paste their MAC address from there by them selfs ? :D
     
  16. Jonny-Roy

    Jonny-Roy

    Joined:
    May 29, 2013
    Posts:
    666
    Extrawurst, if you need to get the blackberry pin, I'll happily send you my plugin. Just let me know.

    Thanks,

    Jon
     
  17. AlexThibodeau

    AlexThibodeau

    Unity Technologies

    Joined:
    Jul 23, 2013
    Posts:
    309
    Hey all, 4.3.1 has the fix for this and a serial number will be returned now instead of a blank string. :)
     
  18. geniuscd

    geniuscd

    Joined:
    Aug 10, 2012
    Posts:
    23
    Hey All , I just tested what the "deviceUniqueIdentifier" returns and happy to share this.
    on iOS it will return a unique string every-time you removed the app from your iOS device.
    if you rebuilt the xcode project, without removing your app from the iphone, the same previous "deviceUniqueIdentifier" is returned.