Any source code for a "real" watch face, or a good tutorial?

Former Member
Former Member
So mainly what I want to build are watch faces. I've seen the audio-less video that Garmin links to. Ok, cool, some decent stuff there, but... I'd like to see the source of a "real" watch face. One that has options and so on.

I see a lot of examples out there, but they're all very simple and none of them have any documentation as to WHY things are done in a certain way. For example - how do you decide where to place elements like the time, BT icons, etc, etc? Usually some variant of the screen width and/or height / 2 is used for the time - ok, so basically attempting to center it. What about the rest of the elements? Is there an accepted formula for arriving at where to put them, or do you just guess at it and keep trying in the sim until it looks right?

I guess what's needed are a set of "best practices." Positioning things is way, way different here, vs., say, desktop development (where most of my 30+ years of experience is...).
  • I've thought for a long time that a full-blown garmin sample app might be nice for something like a watch face. One that does 12/24 hr, checks BT, notifications, shows activity monitor data, etc.

    The things you need are in the SDK samples (and the templates in Eclipse "File>New>Connect IQ Project") but not all in one place. You can see how a basic watch face works, and how to access the ActivityMonitor, but not in the same sample. If a full blown sample was available, I think there would be a bunch of that watch face in the app store - Which may be why there isn't a full blown sample. :)

    Some of the placement stuff (and even the icons themselves) are up to the developer, and there are times you don't want it to look like all other watch faces, and then you have the consideration of square vs tall vs round vs semi-round displays (I might do the icons in a different spot on a round display vs a square one, for example). And BTW, with the icons, there's aren't "standard" ones. I have my own custom font for mine.

    It might take a week or two to put the pieces together the first time, but ask questions here or just search the forum. There was a new thread just a day or two back about how to get various kinds of data to display on a watch face, for example.
  • Former Member
    Former Member over 8 years ago
    -snip-


    All true, sure, but... More watch faces = more users = more money for Garmin. IMO, anyway. Watch faces are what you see most of the time, so I think users really want lots of cool/useful ones.

    I dunno - the samples, examples, and tutorials could be a lot, lot better.

    Yeah, I'll hack it out, but... these kinds of "rites of passage" need to go away. Just make it easy for people to make things. Especially, for example, more creative types - they may have great ideas for gorgeous and useful watch faces, but may be more limited in terms of technical ability. This learning curve may/will keep them for making things for CIQ.

    So, there's really no "standard" as to how to position things? I saw in some thread here someone speaking of a "standard square root way" of laying things out on round faces, but I haven't found said way yet. :D
  • In eclipse, if you do a "File>New>Connect IQ Project", and select a watchface, you get a simple one that displays the time, and you can have it with a couple simple app settings - color and 12/24 hr, IIRC (it's been a while since I looked). After that if you look in the ActivityMonitor and DeviceSettings api, you'll see many of the things you might want on a watchface (I use is24Hour in DeviceSettings and not an app setting as in the template, for example).

    Watch faces in CIQ are a bit limited in what parts of CIQ they can use and there are things like low power mode (an important thing about watchfaces!). In Low Power, the watchface only refreshes once a minute, and will drop out of Low Power for 10 seconds with a gesture, such as a wrist turn. Meaning, you only want to display seconds in that 10 second timeframe. Watchfaces also can't do things like access the HR in real time, fire up GPS, or do any sort of Comm (it's all about the battery - that's why the Garmin watches can go days between charging).

    On top of that, you then have the whole "square vs tall vs round vs Semi-round" thing with the display, if you plan to handle multiple watches. and also things like what's supported on which device. For example, "Floors" is only on devices with a baro-altimeter, and not all of the devices with a baro.

    Have you used a garmin watch yet? Because the simulator is a simulator, and not an emulator, so things like the Low Power Mode can be set on or off, but it's not like a real watch where it re-enters low power after 10 second. As far as what a watch face has access to, it's good at catching that.

    Have you looked around the app store (apps.garmin.com)? That will give you a good I idea of what can be done with a watchface in CIQ. (not all watchfaces are available for all devices, and non wearables like the Edge, Oregon and Rino don't support watch faces).

    As far as specific locations for things if you click on my link, you'll see the watchfaces I have in the store (as well as widgets, data field, and device-apps). "Simple Arc" has 5 images, on various devices, and you'll see the icons on some are on the top, and some, under the date in the center. Have you looked at the UX guide in the SDK? There are some guidelines there, as well as handling touch and non touch devices (which doesn't apply to watch faces as they aren't allowed to get user input!).
  • Former Member
    Former Member over 8 years ago
    Yeah, I have a fenix 3 HR (and my wife has a VAHR), so yeah, I've got access to 2 (very different, too) "real" devices.

    And yeah I know about the battery optimization; it's freekin awesome. I'm coming from a Samsung Gear S2, which, while a very, very nice device, needs to be kept very near a source of electrons. :D
  • For the less techy, more artsy folks, we have fun things like Face-It. :cool: Not quite as flexible or feature-filled as some would like, I know, but we'll get there.

    I agree that our samples could be better. We have plans to improve things, so I'll see whether we can make some more practical example apps. Our intent is to provide simple examples of feature use, rather than combine a bunch of features into one app, which could also be a barrier for people new to coding. However, I've had other feedback from folks asking for "best practices" type info, so we definitely need to do more.
  • If a full blown sample was available, I think there would be a bunch of that watch face in the app store - Which may be why there isn't a full blown sample. 

    Given that Garmin has to approve all submissions, I find this scenario hilariously unlikely, and a poor excuse not to provide full blown sample code with the SDK.

  • Garmin actually doesn't look at such things, not even copyright violations.  If someone clones a WF, that's really an issue between the developers, and Garmin doesn't get involved.  For copyright issues, the holder sometimes will contact Garmin and the app will be taken down.

    Look at the number of clones of garmin's own watch faces.

  • Here's some code for a popular watchface (2 million downloads):

    https://github.com/warmsound/crystal-face

    It's not from Garmin, but maybe it will help.

  • The analog sample in the SDK has a bunch of stuff, and some devs link to their source in the app store.

    Have you looked here?  Peter's site has links to many things:

    forums.garmin.com/.../overview-of-connect-iq-apps-accompanied-with-source-code

  • And it's got a few clones... Slight smile