Is it possible to retrieve the watch's unique device id or serial number on a VA-HR? I suspect there are interesting attributes in System.getDeviceSettings() but I can't find what they are :(
No, there is nothing in the ConnectIQ API that does this.
If you were to implement a web service with OAuth, you could generate unique user and device identifiers there, and then fetch those identifiers via the Communications.makeOAuthRequest().
Hmmm, yes, thanks, I am generating a unique ID for the app/watch combo with a call to my PHP script running uniqid which returns a UUID. What I'm trying to capture is a reinstalled versions of the app (thus different UUID) running on the same watch.
Right. If you require the user to sign in, you can be sure to not give a new uuid for the same user/device, unless they have multiple devices of the same type.
Yes, but I still need to allow for the genuine case when the user accidentally, innocently or as the result of a system fail, reinstalls the app and generates a new uuid. Maybe this will be a sufficiently rare occurrence that I can handle it with some sort of manual intervention. Still I wonder if the hiding of the watch ID is intentional or an oversight by the CIQ team?
It's not an oversight--in fact, we've been discussing this for a while, but it's not as simple as providing the device ID because of security concerns. The most recent thing I've seen proposed is a unique ID created on app install that would be a combination of one or more factors (device ID, app UUID, etc.). The exact details haven't yet been determined.
It's good to know that the issue is under discussion, and that the proposed idea is for a unique id to be generated on the app. (I know you are all a bit over hearing what pebble did, but that's another example: every app install generated a uuid which was accessible to the app).
Unfortunately that doesn't address my issue, as that id would get regenerated each time the app is reinstalled.
I have to wonder, what are the security issues around revealing the watch ID to the developer?
One thing you might consider is that a human can see the watch's serial number (on the back of the watch, and also in Garmin Express, but I don't see it in GCM). Maybe use app settings and have the user enter that number for your app? If they re-install, they'll have to re-enter it, but it's easily available so they can do so.
Not ideal, and it kind of depends on what you want to do with it. (the BLE MAC address is another option and you can see that in "About")
True, and user typos can happen. But the reality here is that posts requesting that CIQ provide a unique ID started probably 2 years ago, so it's nothing you'll likely see in the next few weeks. Not everything you want is a new request, in other words! :)
If it's website access and data you are worried about, have you looked at using OAUTH in CIQ?
Not everything you want is a new request, in other words! :)
I think it's a bit unfair to imply that I'm claiming kudos for a new request. As a newcomer to the Garmin world, I'm heavily reliant on you more experienced folk and very grateful for any guidance you provide.
The Forum is not the most research-friendly repository, so if I'm opening old wounds, a link back to the previous posts might have been a helpful response to my query.