How can I get the Device Type and the Device ID?

Former Member
Former Member
Hello, is there any way to get a unique Device ID from the device?

When I launch the simulator, it says something like:

Device id 1 name "A garmin device"

so there has to be some way to retrieve this information, though I haven't found it in the documentation.

Any tip there?
  • Former Member
    Former Member over 9 years ago
    The device id that's available in CIQ is for the device type. There's currently no out-of-the-box way to uniquely identify the device.
  • I just check the screen size and touch support to differentiate among different devices.
  • An old trusted way is to have a resource string that differs per device that you load and check in code.
  • Former Member
    Former Member over 9 years ago
    An old trusted way is to have a resource string that differs per device that you load and check in code.


    How do you set that string? A randomize at first time execution?
    What happens if user uninstalls and installs again the app?
  • How do you set that string? A randomize at first time execution?
    What happens if user uninstalls and installs again the app?


    Do you know how to set device specific resources?

    You do that by having folders in your project like

    resources-fenix3
    resources-fr920xt

    Then in each folder you have a string.xml file with unique values for each particular device.

    So you then have something like this in the string resource:

    <resources>
    <string id="device">fenix3</string>
    </resources>


    Then you load that string resource in your code and checks if it equals the value you expect
  • Former Member
    Former Member over 9 years ago
    Do you know how to set device specific resources?


    Thank you for the info, but I'm also wondering how to identify a device with a unique ID...
  • You don't, at least not right now you don't. The best that you could do would be a install-specific id. Every time the user removed their settings file (possibly with an re-install) the key would be reset.

    You can use the device partNumber string in combination with the user birthYear and gender, but that would be far from unique.

    If you are trying to implement some sort of license checking, it might be best to write a simple web service that requires a user to create an account (or associate with an existing facebook/google/twitter account) and register their devices. Your app could authenticate with the web service, and verify it has access.

    Or, of course, you could wait until Garmin is able to get this feature into production. It has been talked about several times in the past.
  • Former Member
    Former Member over 7 years ago
    Are there any news on this matter?
  • Have you checked System.DeviceSettings uniqueIdentifier property?
    Available since 2.4.x
  • Have you checked System.DeviceSettings uniqueIdentifier property?
    Available since 2.4.x

    That is nice function. I am using it on my chronos device - I have some specific functions only for myself :-)