How do I use the simulator to change layouts on datafields?

Possibly a dumb question, but search yielded no results ("toggle app settings" is greyed out, and this is a datafield). I've set up a datafield - both a basic one (from scratch for troubleshooting) and one that's available in github (this is the manual). I can see the data outputs, but the datafields are changeable, and the only button that seems to create any sort of response is the top right button (which for this, is an activity datafield, so I get to see the timer only). Highly recommended btw!

Is it not possible to customize the datafield on the simulator? I can't do so on the watch, because once I build the PRG and install it, it seems to just be flashing which indicates I still have some tweaking to do, so I'm trying to isolate the problem on the simulator before going that route again. Plus, it seems I can't interact with my watch while it's charging and plugged into a computer? (Is that new? I usually never really charge on a computer and I know I can interact with the watch during those other times...)

Trying to make a nicer version for the 8, as latest publicly availalbe code supports a 416x416 watchface. The main screen is finally looking good on my 454x454, I just know something's broken somewhere when making changes to the data field and switching things up. I would love to not keep going back and forth with configuring it and sticking it on my device - there's gotta be a way to do this on the sim, right? I restored an older version not including my changes and loaded a 280x280 - the display was fine, but again, I couldn't figure out how to tweak the datafield.

Thanks!

Top Replies

All Replies

  • Yeah, the app is renamed. But I can't figure out what it is. I have a huge XML file that is basically one huge line that's word wrapped 1000x times over.

    What's interesting is that when I load the datafield, it shows IQ! but when I actually run the datafield for an activity (e.g. walking, running, treadmill), it loads fine. So there's definitely something wrong with it somewhere, but it still...works.

    And I still have no idea how to pinpoint the source of this crash. I've added a bunch of System.printlns everywhere but I'm not seeing any such output to work with anyway and I wouldn't know where to go from there.

    p.s. the lack of persistent logins on this garmin.com and the inability to download the apps to my device within the first 6-8 tries is very, very frustrating on top of all of this other weirdness.

  • Ah, so your bug is maybe related to some of the fields you read being null (or maybe division by zero?)

    Though this should be possible to see in the simulator probably, before you start the activity.

    OR: you are just seeing "IQ" (without the "!")? Then it's just the default launch icon. Change it to something else.

  • Nope. I'm was seeing the IQ!, and it began last night after merely making a small font change since it was working just fine (with a few other minor adjustments...now if only I had the history and could've stepped backward, but that's gone). Stayed up way too late continuing to figure it out. For the last 10+ hours, I thought it wasn't working at all, but then I started and activity and it was just...fine. There's still very much something wrong, alas I have no idea where to even start looking for it. This is a complex watchface with a very involved hierarchy. Plus, I think I'm getting IQ! right out of the box as well. It's updated for the latest SDK now and only my F8 51mm (the "fenix847mm") but it's still scaring me whenever I see it and it's not correct.

    For whatever it's worth, it's fine now, but I can't tell you how many copies of this code I recreated and how many folders with expletives (or tamer words, I have kids) I had used for troubleshooting.

  • you can find the mapping in garmindevice.xml
    I have a huge XML file that is basically one huge line that's word wrapped 1000x times over.

    1. Copy garmindevice.xml from your Garmin device to your computer (it's often not possible to directly open files on MTP devices)

    2. Open it in VS Code

    3a. Press CTRL-SHIFT-F on Windows (OPTION-SHIFT-F on Mac) to format the document

    or

    3b. Open the command palette (CTRL-SHIFT-P on Windows, CMD-SHIFT-P on Mac). Select "Format Document".

    (The XML file will now be readable)

    4. Search for your app name. You will find the mapping from your app to the filename on the device. As noted previously, on most devices you will not be able see this file in the file system, but it will be enough information to create a log file or copy over a settings file (both of which have to have the same filename as the app, with exception of the extension)

    e.g.

    <App>
        <AppName>Strava Relative Effort</AppName>
        <StoreId>6b53eedd-bf67-4c18-a2d6-af1d59518357</StoreId>
        <AppId>aabaf454-3c10-425f-b377-b3d1ca5b5ccc</AppId>
        <AppType>data-field</AppType>
        <Version>64</Version>
        <FileName>E7F71141.PRG</FileName>
    </App>

    OR: you are just seeing "IQ" (without the "!")? Then it's just the default launch icon. Change it to something else.

    It's a CIQ data field. CIQ data fields don't display the launch icon on data pages (unless something has changed in newer devices)

  • Yeah, the app is renamed

    If the app is renamed, then you must have installed it from the store. If you have installed it from the store, then you should be able to see crash reports in the ERA viewer after syncing your Garmin device with Connect (*). (The ERA viewer only shows logs from the most recent version of the app uploaded to the store)

    1. Open VS Code

    2. Open command palette (CTRL-SHIFT-P / CMD-SHIFT-P)

    3. Select "Monkey C: Open ERA Viewer"

    [https://developer.garmin.com/connect-iq/core-topics/exception-reporting-tool/]

    Have you gone through the Connect IQ developer documentation?

    (* This situation may be a bit fuzzier if you *both* installed the app from the store *and* subsequently sideloaded it. In this case, the app *may* be renamed, but you may not get any of the perks of installing the app from the store, such as app settings and ERA reports. In this case, it may be best to uninstall either the store version or the sideloaded version in the Connect IQ app. You won't ever see both of them on the device at the same time, but you should be able to uninstall one or both in the CIQ app)