How to retrieve a device ID like Mac Address to unique identify similar to Android or iOS

Hi, 

We are developing a Garmin Watch App in MonkeyC. We would like to uniquely identify difference watches of the same model who so ever is running our App. We tried to get Id following way - 

`var mySettings = System.getDeviceSettings();
var deviceId = mySettings.partNumber;
var id = mySettings.uniqueIdentifier;`

But, this id seems to be changing everytime we create a new build. 

Any insights here will be appreciated. 

Thanks

  • You can’t. Garmin purposely does not give you a (purely) device-specific unique identifier, most likely for privacy reasons.

    As you noticed, DeviceSettings.uniqueIdentifier is only unique for a given combo of app and device.

    It is too bad that the ID changes when the app is rebuilt, as opposed to being stable across rebuilds.

  • I guess a workaround could be for your app to read DeviceSettings.uniqueIdentifier on first run, then persist it to Storage. The next time you need the ID, use the one in Storage. I think this value should be stable across app updates, and would only be reset if the user uninstalls and reinstalls your app.

    I’m not a lawyer, but I assume you’d need to mention that you’re doing something like this in your privacy policy. The docs for DeviceSettings.uniqueIdentifier already mention privacy policy concerns btw. (i.e. if you use uniqueIdentifier to track users, then you have to say so.)

  • Also, note that it’s possible for a device’s part number to change (although this is super rare and I only know of one instance):

    [https://forums.garmin.com/developer/connect-iq/i/bug-reports/enduro-2-was-not-exported]