Search Unity

SystemInfo.deviceName is <unknown>

Discussion in 'Android' started by cdivossen, May 18, 2015.

  1. cdivossen

    cdivossen

    Joined:
    Mar 7, 2015
    Posts:
    2
    Hi!

    I'm trying to get the user defined device name on Android, but all I get from SystemInfo.deviceName is "<unknown>". The deviceUniqueIdentifier works, but I'd like to have something a bit more human readable. Is this a bug? Is there another way to get the device name?

    Best Regards,
    Claus
     
    JGameMaker92 likes this.
  2. bitter

    bitter

    Unity Technologies

    Joined:
    Jan 11, 2012
    Posts:
    530
    There is currently no reliable way of getting the user defined device name - at least not to my knowledge.
     
  3. Ravnock

    Ravnock

    Joined:
    Nov 10, 2016
    Posts:
    9
    Any update on this?
     
    JGameMaker92 likes this.
  4. JGameMaker92

    JGameMaker92

    Joined:
    Oct 15, 2014
    Posts:
    96
    Almost 2018 and SystemInfo.deviceName for Android is still unknown. :( how am I supposed to know what they named their Android device? It works in the Editor and on iOS but not for Android. Please fix this.
     
  5. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,920
    Still no reliable way to get it,

    you could try using JAVA code:
    Code (csharp):
    1.  
    2. import android.provider.Settings;
    3. ....
    4.  
    5. Settings.Secure.getString(getContentResolver(), "bluetooth_name")
    6.