Watch crashes when opening app settings on phone

Good morning,

I have just created my first proof-of-concept app (a widget with a glance). It works well, both on the CIQ simulator and on my actual watch, an Epix Pro/Gen 2/47mm, after side loading it by copying the .prg file to the Garmin/Apps folder. On the CIQ simulator I can call up the properties and it shows them fine. However, when I open the settings of the app in the Garmin Connect app on iOS, the watch crashes and reboots.

Any ideas of what I could be doing wrong? The app is a debug built, but not sure how I can access any relevant debug information that may help?

Here is the XML in which I define the settings.

<resources>
    <properties>
        <property id="url" type="string">http://net-nas-1:7070</property>
        <property id="refreshInterval" type="number">10</property>
    </properties>

    <settings>
        <setting propertyKey="@Properties.url" title="evcc API URL (e.g. https://myhost:myport, http works only with iOS, Android requires https with valid certificate!)">
            <settingConfig type="url" required="true"/>
        </setting>
        <setting propertyKey="@Properties.refreshInterval" title="Refresh Interval (seconds)">
            <settingConfig type="numeric" required="true" min="5" max="60"/>
        </setting>
    </settings>
</resources>

Thanks for your help!

Regards, Robert

  • How were you even able to open app settings after the sideloading? App settings work only for apps that were installed through the Connect IQ store (work for both beta and release builds) since their metadata is preserved on the server side, not locally in PRG.

    Also, you have to implement a lot of safe-checks for the property retreival logic in order to avoid Unexpected Type errors, as stated in the FAQ:

    forums.garmin.com/.../new-developer-faq

  • My side loaded app still appears in the Connect app, and when I open it there, the watch crashed.

    Thanks for the link, but as I understand those issues would only occur after saving an invalid value?

  • Not only invalid value. For example, when you call getProperty() in the sim it returns Number and everything works fine. But when you save settings using real Android it may return this number as a String and causes error. So we have to implement the safest way to get property as a Number by ourselves.

    You need to remove your sideloaded app from the watch using the Garmin Express on desktop, then publish your app in the store as beta, and only then test settings

  • Thanks, I‘ll try to register my app as beta. Still weird for the whole thing to crash, but who am I to question why … Wink

  • It definitely shouldn't crash the watch. If it's only your app, then it's most probably a bug you can fix, but even the biggest bug in your app shouldn't crash the watch.

    However I agree with SpitRider, that it looks like there's more going on there. If you side loaded an app that is not in the store then settings shouldn't work. There's no way it could work. So I guess that's not what happened, but maybe something like this: you have the same app, with an older version in the app store, then you added some things, and then side-loaded. I'm still not sure if it should work (even if you haven't change the settings, properties), and I think if it does work then it most probably is caused by some other bug in the ConnectIQ, so probably all you see is not much relevant to testing the code you think you're testing (most probably at least part of the things you see/experience isn't the code you side-loaded)

  • So I guess that's not what happened, but maybe something like this: you have the same app, with an older version in the app store, then you added some things, and then side-loaded.

    No, it is my first app, and it is in its early stages, I never submitted it to the app store. I side loaded it, and then it appeared on the Garmin connect app on iOS.

  • iOS... well, I only have android, where you would only see the app's name and a general icon, and at the moment you couldn't even click on the app). In the past (and hopefully again soon) you would be able to click on the app and there you could at least delete it. As far as I know there shouldn't be a Settings button there in case the app is not downloaded from the store as you say. So it's very strange. Maybe this is some feature that iOS Connect IQ knows, but it wasn't implemented in android????