Experienced developer, new to Garmin, looking for SOE

We had a fully features yacht racing app ready to go on a pebble (RIP) and want to migrate to Garmin Vivoactive HR.
No prior experience with the platform so big learning curve.
Biggest issue is understanding Garmin's "Standard Operating Environment" (SOE)
As our sailing app is deeply involved in tracks, courses and routes I am interested to discover the details of the facilities available to me as a developer to interact with these features.
For example,
  • is it possible to record the GPS values of SOG and COG in the GPX track file?
  • Can I persist other data that may be downloaded from our web site, such user ID, yacht name, yacht characteristics etc?
  • What are the characteristics of a "course" or "route"?
  • What facilities are there for a user to define a course?
  • Is there any documentation at a level between the very high level Programmers Guide and the API Docs which assumes a detailed understanding of Garmin SOE?

Need help!
  • In addition to the api doc and the Programmer's guide, there's also the UX guide and the samples which may help. When it comes to what and how you can do things in general (native apps) check out the device specific forum, as with all the supported devices, things are different between the va-hr and a Fenix for example - some devices have native support courses/routes and some don't.

    Then spend some time looking around the app store. There are some sailing apps there, and there are others (like dwMap) where you can define things on the developer's website, and use them on the watch. There's also routeCourse (https://apps.garmin.com/en-US/apps/b7efc9ca-5446-4e1c-bc53-474e97f376ac) - same group as dwMap - that allows downloading things, but is only on things like the Edges and is then available for the native apps. Just to give you some idea of what can be done in CIQ (disclaimer. I've never used dwMap or routeCourse myself!)

    Also, maybe just page through the CIQ Showcase forum - that should give you a good idea for things available for all different device types.

    As far as the "SOE", much of that is learning how the native apps on the devices work, as CIQ is really an extension of that when it comes to a recording app. (it's really the Garmin "SOE" and not specific to CIQ) Granted, there are some things that aren't seen in native apps (there are some games, widgets/apps that get/display different kinds of data, etc), but understanding the native things helps.

    For example when you are recording, you need to determine what data you want (GPS, HR, Temperature, non-standard ANT+ sensors, etc) in both your app and recorded to the FIT file (you'll be recording a .fit and not a .gpx). In CIQ there are "developer fit fields" where you can include non standard data in the .fit (data from a non-standard sensor would be an example)

    Also, when it comes to what you can do, there are differences in what the devices can do with CIQ. right now, the older watches are running CIQ 1.x, while the newer ones have 2.x. The two versions vary both in available functions, as well as memory available for apps. There are some things that also vary base on the specific watch (the fr 230 and fr 235 both have 1.4.x CIQ, but you can't use getHeartRateHistory() on the 230, as it doesn't have wrist based HRM while the 235 does and it can be used, for example)

    For persistent data, in CIQ there's the Object Store, and for configuration, there's app settings (you can set options from your phone, for example)
  • If you haven't done so yet, maybe try out the native run or walking app, record a few things, upload (just sync) to Garmin Connect, and look at the data for that activity to get a better feel for things. The User's guilde for your specific watch will help you learn the environment of that watch (but not for all, as there are difference like touch screens, vs non touch, how the have menus look, etc, and even how to get to CIQ apps)

    Then try something in the app store, where you can see how things work there. I have one that might be a good one to try -
    Simple Walk. I'm not sure what watch you have, but it's available for all wearables except the Epix and fr 920. (Some of the watches don't have a native walking activity)

    It runs like a native app - The the start button to start/pauses recording, swipes or up/down button to change screens, "back" is used for manual laps (but the default is auto laps), screens of internal data fields (where there are options for each field), your path is shown on the chart page, etc, and it's got options that are changed with app settings. it uses the HRM, and Tempe Temperature sensor if available, and GPS. Upload (sync) that activity and you can see how it looks in Garmin Connect too.
  • Thanks, more info please

    Hi jim_m_58. Thanks for your detailed responses.
    I am taking a cautious approach to settling on a new platform for hosting my app, so haven't yet invested in a Garmin device.
    It would appear that the Vivoactive HR is the only target platform with the necessary capability.
    Not having a device, many of your suggestions for exploring the capabilities are unavailable to me.
    Could you provide reference links to the following subjects you mentioned in your reply:
    • UX guide
    • native support courses/routes
    • CIQ Showcase forum
    • it's really the Garmin "SOE"
    • you'll be recording a .fit
    • In CIQ there are "developer fit fields"
    • there's app settings

    Thanks
  • Hi jim_m_58. Thanks for your detailed responses.
    I am taking a cautious approach to settling on a new platform for hosting my app, so haven't yet invested in a Garmin device.
    It would appear that the Vivoactive HR is the only target platform with the necessary capability.


    Actually, the va-hr is what I'd consider the current gen entry the entry level device with CIQ and for some things the least functional. There are three series of wearables - the vivos, the forerunners, and the "Fenix family".. (f3, f3-hr, Chronos, D2, etc). The Fenix family is what I'd consider the most functional over all. The va-hr does have a lot of functionality, but you can't download courses to it, for example. Forerunners are mainly running watches (that also do things like cycling, with the higher end doing more), and the Fenix are the high end devices. Then there are the non wearables like the Edges, Oregons, and Rinos.

    Not having a device, many of your suggestions for exploring the capabilities are unavailable to me.
    Could you provide reference links to the following subjects you mentioned in your reply:
    • UX guide
    • native support courses/routes
    • CIQ Showcase forum
    • it's really the Garmin "SOE"
    • you'll be recording a .fit
    • In CIQ there are "developer fit fields"
    • there's app settings

    Thanks

    The UX Guide in part of the SDK, as is the Programmer's guide and API doc. The SDK is free: https://developer.garmin.com/index.php/blog/post/connect-iq-2.2.1-now-available

    That's also the place with description for some of the other things you are asking about.

    The CIQ Showcase forum is a sub forum to the one your posting in ( Click on the link at the top of this one , or here's the direct link: https://forums.garmin.com/forumdisplay.php?515-Connect-IQ-Showcase. The Programer's guide also shows you how to set up the SDK so you can try things using the simulator.

    For the watch user's guide a simple google for something like "Vivoactive HR manual" will find you one.

    You're best place to start is probably to just grab the SDK and look and the Programmer's guide and UX Guide, and you see some sample code there too.
  • Aha!

    Being a long-time Eclipse user for developing Android apps, I installed the SDK into Eclipse and so missed out on finding the great documentation thet is included in the SDK download.
    So, I've found many of my answers.
    One outstanding subject is how do I export a user's track file to my web site? What programmatic access do I have to POST the FIT file to my site?
  • I'm guessing you are planning on writing a complete app given your starting point of porting an app. The only other option is just doing data fields but the functionality is quite limited, such as no access to web requests or user input. If you are writing the complete app, you have access to all of the CIQ functionality but you don't have access to the courses or other data files downloaded to the watch. There is no "course" api to help you with following or drawing courses. You basically are pretty much rolling all of your own functionality other than the actual recording of your track plus common sensor data. So for courses, you'd need your own interface to a server or phone app to download the course and store it in your apps limited persistent store on the device.

    You are correct that the Vivoactive HR is one of the more functional devices currently, despite being a mid level device. But I'm sure that is going to change as they come out with replacements for the Fenix and FR630. I would expect a new Fenix to come out in the near future and would expect it to significantly exceed that VAHR as it is there flagship watch. Any of the older devices, like the FR630, are quite limited in terms of memory (< 64K for the entire app) and limited performance.

    There is a learning curve to CIQ development, especially writing complete apps. The samples and this message board are always great resources.
  • Yes, correct, I have a complete app written for a pebble with with extensive supporting web site services.
    Very disappointed that I don't have access to courses, routes and tracks - that would have saved me many weeks of development. Any chatter to indicate it may be on the radar?

    Do I have access to the user's recorded track other than from the location object? Including SOG/COG?

    Also, I'm nervous about the amount of memory available for the program and resources as there are 3000 lines of javascript defining the "business rules" of the app to be ported to MC. I see references around the place to memory limitations but cannot find any specs of what is actually available - on the VA-HR. On the pebble I had 56Kb for the compiled C code and 256K for resources, but I had effectively unlimited space on the phone (inside the pebble phone app) for my javascript.
    Is there a spec of the memory available to a developer on the VA-HR?
  • Is there a spec of the memory available to a developer on the VA-HR?

    You can look at {SDKROOT}/bin/devices.xml. You will find a device entry for each supported device, and within that you'll find a block like this (this is for the vivoactive_hr)

    <app_types>
    <app id="watchface" memory_limit="65536"/>
    <app id="watch-app" memory_limit="131072"/>
    <app id="widget" memory_limit="65536"/>
    <app id="datafield" memory_limit="32768"/>
    </app_types>


    Note that those are the limits, not the actual amount of memory available to your application. If you use the ActivityRecording module in a watch-app or widget, you will lose ~7K on some devices. Also keep in mind that when SDK features are added to a device firmware, that may reduce the amount of memory available to your application even further.

    I believe the memory limits were published in the programmer's guide previously. I took a peek around and it looks like they're not there; either I'm looking in the wrong place or they were removed (most likely to reduce maintenance costs).

    Travis
  • For a device-app, on 1.x watches it's 64k, while on 2.x watches, 122k. The current 2.x watches are the va-hr, fr735xt and Fenix Chronos. While the bit for the va-hr shows 128K for the va-hr, 6k is used by the VM on 2.x devices, leaving 122k.

    And like Travis mentioned when starting a recording, the Fenix 3 for example grabs 7k of that 64k (again this can be seen in devices.xml)

    <app id="watch-app" memory_limit="65536" fit_session_memory="7168" />

    (the vivoactive uses 4k in the same way)

    And the max does differ if you are doing a watchface, data field, or widget (a DF has a max of 16k on a 1.x watch, and 26k on a 2.x watch)

    For local storage, the ObjectStore for an app is a max of 8k IIRC.

    When you are testing in the simulator, the bottom line does show you the current memory for your app, the max memory for your app, as well as the peak memory used, which is nice of you're testing a number of targets and forget which has a 64k limit and which has 122k.

    NOTE: The devices.xml file is pretty much a "look but don't change" file. For example, you can't allow your app to be larger by changing the memory_limit. It's used by both the sim, as well as the process of building a .iq for the app store, and you'll see various part numbers for what looks to be the same device - it's because some devices have the non-APAC version and APAC variants with may have differences like the minimum firmware version. (APAC= Asian-Pacific= different languages available)
  • Back to the drawing board

    AARGH!
    That looks like a show stopper!
    I have just checked the memory usage of an app running in the emulator that's maybe 20-40% as complex as mine an I see it's reporting "Mem:87.5/122kB, Peak:90.7kB".
    On that basis there's no way my app is going to run on a VA-HR.
    Back to the drawing board (sigh!)
    Thanks guys for the valuable advice.