Identifying the device

Hi all

I'm looking at developing a widget that connects to our training community and fetches some data using a web service but I need some way to identify the user so that I look at the correct user in out database before sending the data back to the device.

Since I cannot (as I understand) configure the widget itself I thought I could let the user enter some unique value, like the serial number, on his profile on our site and then send the serial number when I make my request to the web service. But I cannot find any way to get the serial number. I found that I can get the ANT-id but then I realized that a widget cannot use ANT.

Is there some way I can uniquely identify the device from my widget to make this work or do I have to wait until settings for each .prg is made available?

Thanks for your time reading and replying to this.

Regards
Johan
  • You should be able to use TextPicker to allow the user to input data like a serial number. Unfortunately, since the TextPicker isn't supported on the vivoactive you'd need to write something for that device. If the serial number is restricted to a specific character type (digits, alpha, uppercase alpha, ...), it may make sense to write your own text picker.

    If you don't want to do that, then the only option I see is to wait until the ability to change settings from Garmin Connect Mobile and Garmin express is made available.

    Travis
  • Johan,

    Our app Note2Watch had to solve that exact problem as well. We considered several different approaches, but the route we settled on was using the concept of pairing the watch with a remote account via a 'pairing code'.

    The flow is:

    1. User downloads watch app
    2. Watch app presents a Pairing Code and a link to a signup form
    3. User creates account on hosted service
    4. User enters pairing code from watch app
    5. Watch queries hosted service for token using pairing-code
    6. Hosted service responds with token which is then stored on the watch
    7. All subsequent requests now use that unique token
    8. Hosted service uses token to look up each user


    Hope that helps!
  • Just curious. Where is the token stored in the watch? As a FIT file?'fornthe app
  • The only place you can store/retrieve data; App.setProperty, App.getProperty.
  • Yep, the token is stored as a property.
  • oh.. I see..
    Thanks.. This may be the next thing to learn then. (A way to determine only a select user to "unlock" additional features)