How do I make an app that will take user defined values from their phone in the connect IQ app and incorporate them into the app?

Case use: A skydiving application that takes a GPS coordinate via Latitude and Longitude, and Elevation and incorporates the position into an app that allows essentially waypoint distance and bearing from the users current position.

I'm having trouble finding references as to how to interface the phone connect iq app and an app i've written.  At  this time, I've been able to define specific latitude, longitude, and elevation in the program, but I don't want to have to go into the code and change those values every time I want to use a different location. Is there an easier way to have a user defined configurable variable? In my mind, I'm imagining the app in Connect IQ with settings that allow you to input those values. Thanks in advance!

  • You're thinking of app settings, which are modified in the Connect IQ phone app, like you mentioned: https://developer.garmin.com/connect-iq/core-topics/properties-and-app-settings/

    You also have the option of implementing a settings interface in your CIQ app itself:

    - for a device app, just directly implement the settings UI yourself [*]. Typically a device app will respond to KEY_MENU by pushing some sort of global or context-sensitive menu. The entirety of this menu UI can be your settings, or your settings can be some subset of that UI

    - for a data field or watch, provides on-device settings by implementing AppBase.getSettingsView() and returning a view which implements your settings UI

    [*] i.e.

    - push a Menu2 view when the user triggers the KEY_MENU shortcut - on 5-button watches, the user holds the UP button

    - implement settings as items in the Menu2

    - read and persist settings values using Application.Properties: https://developer.garmin.com/connect-iq/core-topics/persisting-data/ 

  • I guess i'm still having some trouble. When I try to follow the guidance in the developer.garmin.com forum i keep running into issues likely due to my lack of understanding.  Am I supposed to generate a new "settings.xml" in resources/settings? for an app? Are there changes that need to be made to manifest.xml to get the prorgram to draw from the settings app? Do I add the settings coding directly to the properties.xml? I have tried all of these and connectiq has not been able to work, typically with saying it doesn't recognize any of the xml files im adding or the coding im adding to a preexisting xml is wrong. Are there more direct instructions as to how to:


    Make configurable variables that are editable via phone app

    Upload that data to the app

    Run the app.

    Thanks in advance

  • 1) Add settings and properties XML to your app

    The <settings> XML block defines settings that will appear in Connect IQ app. Each setting will be associated with a property in the <properties> XML block

    2) Use Application.Properties.getProperty() to read app properties at run-time

    3) Test settings in the simulator using File > Edit Persistent Storage > Edit Application.Properties data

    4) Enable settings to be modified in the Connect IQ phone app by submitting your app to the Connect IQ store

    4a) In VS Code: open command palette, select "Monkey C: Export Project". This creates an IQ file 

    4b) Open the Connect IQ store website - https://apps.garmin.com/, log in, click the 3 lines / hamburger menu, select Developer Dashboard > Upload an App

    You can also directly go to the developer dashboard via https://apps-developer.garmin.com 

    If you're just testing and you don't want other users to be able to see or install your select, check the "beta" checkbox


    If you're still having trouble:

    - take a look at the ApplicationStorage SDK sample (command palette > Monkey C: Open Samples Folder)

    - take a look at the code for the popular Crystal watchface for a real-life (but complicated) example: https://github.com/warmsound/crystal-face 

    Run the app.

    Are you not able to run your app yet?

    Run your app in the simulator:

    - In VS Code:

    - Open project

    - Command Palette > Build Current Project > [select target, if applicable]

    - Press CTRL-F5 to run your app in the simulator

    Run your app on the device without using the store ("sideloading"):

    - In VS Code:

    - Open project

    - Command Palette > Build for Device  > [select target, if applicable] > [select output folder]. This will build a PRG file

    - Connect your watch to your PC/Mac using the charging cable

    - If using Mac, use 3rd party software such as OpenMTP to browse the watch's files and folders: https://openmtp.ganeshrvel.com/

    - If using Windows, use File Explorer

    - Copy the PRG built by Build For Device to \GARMIN\APPS on the watch

    - unplug the cable

    Install your app via the Connect IQ store:

    - See instructions above