This folder contains the source code of the app, written in Monkey C, Garmin’s programming language. It uses the Connect IQ SDK for user interface components, application settings, persistent storage, and HTTP communication with the openHAB server.
Two mechanisms are used to tailor the source code for different target devices:
- The relevant
configandthemedirectories are added to the device-specific source path inmonkey.jungle. - In the shared
mainsource, exclude annotations are used to adapt the code to individual target devices. These annotations are mapped to devices inmonkey.jungleand are documented there.
(:glance)marks code that must be included in the Glance view.
All .mc files include inline comments and documentation describing the purpose and internal workings of each class.
This folder defines device-specific configuration using code-based Constants, which replace Garmin SDK Properties due to their limitations. Unlike Properties, Constants are embedded in the code, update automatically with new app versions, and benefit from compiler validation.
For more details, continue reading the folder’s README.
Contains the core application source code that is shared across all target devices. This includes the data layer, infrastructure and service components, as well as the user interface logic and views.
Although the main code is designed to be largely device-agnostic and to rely on config and themes for device-specific behavior, there are a few places where different implementations are required depending on device characteristics, such as button-based versus touch-based interaction or round versus rectangular displays. In these cases, device-specific code paths are introduced using exclude annotations directly within the source.
For additional details, refer to the folder’s README.
Themes define the color schemes used in the app and can change dynamically at runtime. This also includes icons whose colors must be adapted to the active theme. Themes are used to implement the light and dark mode on Edge devices.
For more details, continue reading the folder’s README.