Source code for Stylo (12 & 24 hour, with seconds) for the Garmin Vivoactive HR (https://apps.garmin.com/en-US/apps/aea3b8c6-3def-4998-a65b-bdff9b00f01b)
Please import this project following the instructions here: https://developer.garmin.com/connect-iq/programmers-guide/getting-started/ under the heading "Importing an Example" so as to create a copy, allowing you to work off a copy instead of the original files.
And most importantly, each project has been assigned a unique identifier UUID and it's recommended that you generate your own UUID for the project (it's "ID=" in the manifest.xml). If you have my version of the app on your device and then upload your own with the same UUID as mine, it could result in something messy. Please refer to this page: https://developer.garmin.com/connect-iq/programmers-guide/entry-points/ under the heading "Application Attributes" for more details. You can generate your own UUID here: https://www.uuidgenerator.net/version4
I am making the source code available to the public to play around with. However, don't work on this project itself and then upload the completed project to Garmin. Create your own project and use this as a sort of sandbox and reference and then move the code lines over to your own project. This would also resolve point #2.
By the way, this stuff is not copyrighted so feel free to modify and mess around with it. Just don't sell it for profit or otherwise. :-)
This watchface allows the user to choose the colour for the hour and minute, the date display format, and the data field to display via the Garmin Connect app on your smart phone.
There is an additional file to create/amend unlike the other non-configurable watch face: properties.xml. This file basically sets the choices to be shown to the user and the corresponding number for the choice to be used in the file StyloMyloView.mc
NOTE: I have only tested this with the Garmin Connect app for the iPhone. There is an issue where configuration may cause some issues with Android's Connect app. Though I have addressed it in the coding for this watchface, I have not been able to test it on an Android smart phone as I do not have one.
The hour and minute in huge fonts are shown on two separate lines. Depending on the time format set on your watch, it will display either 12 o2 24 hours. For 12 hours, an AM/PM will appear on the right of the hour. Seconds is displayed on the right of the minutes when in high power mode (when you raise your wrist to look at it). The way the watch is built, developers cannot get the seconds to show constantly as this will drain the battery.
Configurable date is displayed at the top. And on the extreme right of that is the battery strength indicator.
The data field is displayed at the bottom. On the extreme right of that is the Bluetooth connection indicator, alarm indicator and phone notification indicator (which will appear over the Bluetooth indicator) if there is an incoming notification.
When configuring the watch face, please note that changes will only be effected on your watch display when you raise your wrist to look at it (high power mode) or when the minute change (the watch refreshes once every minute).
- Time font is Coolvetica available from http://www.dafont.com/coolvetica.font
- Advice and tips from jim_m_58 of Garmin forums were invaluable