[Feature request] seperate example files in SDK

In my opinion it would be useful to divide al sample files into App, Datafield, Watchface and Widget subdirectories - maybe this could be done in future SDK releases...

Samples:
+---App
¦ +---AccelMag
¦ +---Attention
¦ +---Comm
¦ +---Flashlight
¦ +---GenericChannelBurst
¦ +---Input
¦ +---Keyboard
¦ +---MenuTest
¦ +---MO2Display
¦ +---ObjectStore
¦ +---Picker
¦ :
¦
+---Datafield
¦ +---ChartDatafield
¦ +---FieldTimerEvents
¦ +---MoxyDataField
¦ +---SimpleDataField
¦ :
¦
+---Watchface
¦ +---Analog
¦ +---Basic
¦ +---Clock
¦ :
¦
+---Widget
+---ActivityTracking
+---ConfirmationDialog
+---Drawable
+---NumberPicker
+---ProgressBar
+---SensorHistory
:
  • It would also be nice if the documentation for each sample could explain the code a little. Right now we have a functional description of using each sample, but no explanation of the code used to derive this functionality. The comments are simply not enough and sometimes I am left scratching my head as to how the samples work. This was especially true for me for the new background sample, and how to get this working in a watch face since the sample has it as part of an app.

    I'm sure there would be a higher takeup of CIQ if the samples were better documented / annotated and explained. Maybe tips on app design too showing how to push and pop views in different types of scenarios since I have seen a couple of people struggling with this recently.
  • One of the things that comes into play when writing samples, is that they are often written by people that know the language really well and maybe have some standard ways they do some things. (the "style" part of coding).

    Could the samples be better documented? Yes. (I'd go with comments in the code itself vs a separate doc). If you see a sample that needs more, maybe pass suggestions for that sample on to Garmin, along with a suggested comment if you can.

    Also, in the 2.3.1 API doc, there's a whole bunch of example code right in that doc.
  • In my opinion it would be useful to divide al sample files into App, Datafield, Watchface and Widget subdirectories - maybe this could be done in future SDK releases...

    Samples:
    +---App
    ¦ +---AccelMag
    ¦ +---Attention
    ¦ +---Comm
    ...
    :


    The seperation could be beneficial to people starting out... but I'm not sure about seperating it, I think most of use when looking at the samples we're looking at a sample of the kind of functionality which could be in any application type really, so you'd have to browse several directories.

    Perhaps a two letter prefix could make best of both worlds?

    AP AccelMag
    AP Attention
    ...
    DF ChartDataField
    ...
    WF Analog
    ...
    WI ActivityTracking
  • Former Member
    Former Member
    I love the ideas! I'm not sure exactly how it's going to be implemented, but I do know that we have plans to do some cleaning and revamping of our samples and their accompanied documentation.

    Thanks!
    -Coleman
  • To me, it makes sense to leave the samples in a flat directory structure (but maybe do something like change the names to something like "ExampleX-wid").

    An example case is something like the SensorHistory. While the sample is a specific type of app, what it demonstrates applies to all app types, and with a flat structure, you wouldn't have to look in different subdirs to find it, or maybe assume that since there isn't a SensorHistory sample under watchfaces, that it can't be used for watchfaces.