Tag: Development

  • Installing Garmin SDK in Ubuntu 22.04

    Installing Garmin SDK in Ubuntu 22.04

    The steps to setting up a development for Garmin IQ in the past for Ubuntu 20+ have had some issues with library dependencies, but these seem to have been cleared up in the recent updates. This article will go over how to easily setup the simulator for Garmin devices in conjunction with VSCode on Ubuntu 22.04.

    1. Download the SDK

    Install the SDK Manager Page

    Visit https://developer.garmin.com/connect-iq/sdk/ and read the license agreement. Then accept and download the APK for Linux. It will download a zip file. Extract this to get the bin and share folders. I recommend extracting it to a location outside of your downloads folder so they are not lost later.

    Once extracted open the bin folder and double click on the file named ‘sdkmanager.’ This should open a GUI that will download the SDK and devices. If you can not run the executable file you can give it permission to run by right clicking sdkmanager>Poperties>Permission and checking the box next to Execute: Allow Executing File as Program. Or you can navigate to the parent directory in the terminal and use the following command:

    sudo chmod +x sdkmanager
    The File Manager

    Once the GUI opens up click Use as SDK next to one of the SDK options. You may have to drag the window size out to see the option. You can also manage the Garmin devices it downloads in the Devices tab.

    2. Install Monkey C in VSCode

    Assuming you have Visual Code Studio installed, open it up and navigate to extensions in the left sidebar. Search for “Monkey C.” Select the option by Garmin and install it.

    Monkey C is an object oriented programming language created by Garmin for their IQ Connect ecosystem. You can program watchfaces, apps, widgets, and data fields using it. It is meant to be easy to learn and similar to other familiar programming languages. You can read more about it here and get the documentation.

    3. Start a Project

    Create a folder in which you can store your Monkey C project. Open the folder up in VSCode. Now hit Ctrl+Shift+P. This will open up a command search. Search for the Monkey C: New Project Command.

    VSCode Command Prompt

    Follow the prompts to give your project a name, select type as watchface, select simple, and then version 3.0.0. Make sure to put the project in the newly created directory.

    VSCode open to GarminApp.mc

    You should now have a file structure built with a Resources folder, Source folder, and a manifest.xml file and a monkey.jungle file.

    4. Create Developer Key

    Before we can run the watchface on the simulator, we need to make a developer key. Type Ctrl+Shift+P again to pull up the command search. Search for “Monkey C: Generate a Developer Key.” It should open up a file manager screen from which you can choose a location for your key to be stored.

    Developer key has been set notification

    Once you select the folder it will display a message like the one above in the bottom right of the screen. You are now ready to test run the watchface on the simulator.

    5. Run the Watchface on Simulator

    Type Ctrl+Shift+P once again and search for the command “Monkey C: Edit Products.”

    VSCode Command Prompt open

    Find a watch model from the resulting drop-down menu and click on the checkbox next to it. This will set it as the target device for use in the simulator. Now navigate to the GarminApp.mc file in the Source folder using the file manager sidebar on the left.

    Go to the top and click on Run>Run without Debugging. If all goes well, it should take a few seconds to open the simulator and run the watchface. Your development environment is now all set!

    Garmin simulator in VSCode
  • Garmin: Custom Watchfaces

    Garmin: Custom Watchfaces

    There are a couple of methods for creating custom watchfaces for Garmin watches, but most are not great. In this post, we will quickly review three methods, focusing at the end on what is in my opinion the best and easiest tool for watchface creation.

    Connect IQ App

    The intended creation method by Garmin for the average user is through their Connect IQ app. From the app you can choose from a large selection of premade watchfaces and there are limited options for making your own. If you tap on the Face It tab down on the bottom, it lets you select an image from your phone and then put a clock overlay over it. There is not a ton of variation you can get with this, but it is simple and very intuitive.

    Monkey C and Garmin SDK

    Garmin’s provided SDK allows developers to make apps, watchfaces, datafields, and widgets. To their credit, the SDK is available on most operating systems, including Linux. It uses their own object-oriented programming language called Monkey C, that for developers is very intuitive. This is how those nice premade watchfaces in the Connect IQ store are made. The only problem is the normal Garmin user most likely does not have the skill set to program their own watchface. But not all is lost.

    Watchface Builder for Garmin

    Enter Watchface Builder for Garmin. Watchface Builder is an online tool developed by user Josh Hu. It has a very large selection of watchfaces that other users have made available for download.

    Its main feature, the Builder, lets you create custom watchfaces using a drag and drop interface. You can add in many data fields which will update dynamically throughout the day with your latest health statistics. You can even upload custom images or choose from its library of images. Simply start a new build and select the model of watch you have. It is super easy to use and gives tons of creative freedom.

    Once you have finished designing, clicking build in the top right will load your design and take you to your watchface’s description page. From there you can download your watchface as a zip file.

    To load your new watchface, connect your watch to the computer using its charging cable. Navigate into your watch’s apps folder by going to /Garmin/Apps. Extract from the downloaded zip file to get the .prg file. Copy this .prg file over to the watch’s apps folder. Disconnect the watch and when it loads up again, it will have your custom watchface. That is all.

    Note: When designing your watchface, it is important to know that the more data it has to display and update, the more it will your drain your battery. A simpler watchface might be more suitable for you if long battery life is important to you.