This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Watch Face Exception when changing settings via Connect on Android

Could anyone suggest how to debug this error ?

I have a watch face that gives an error when updating the settings via the Connect IQ application on an Android device. If the settings are updated via Garmin Express on a PC or Connect IQ on an iOS device it works fine!


ERROR: Unhandled Exception
DETAILS:
STORE_ID: f79b954c2ad34c5a845e5f3e13e2ccbc
CALLSTACK:
  • Could anyone suggest how to debug this error ?
    Are you the developer of the watch face, or are you a user who is not the developer?

    I have a watch face that gives an error when updating the settings via the Connect IQ application on an Android device.
    See https://forums.garmin.com/showthread.php?370765-Watch-face-crash-on-settings-change-made-from-android-app
  • I am the developer. The application works fine in the simulator across a range of devices. On android it seems to have a problem.
  • OK I managed to get an android device and side load the application with some debug trace in it. My application was reading an application property defined as a number and using that to index into an array. When the settings were changed via Connect IQ on android my watch application received the 'number' as a float and it caused the index into the array to give an exception.

    Problem was fixed by reading into a variable and then using the .toNumber() function to make sure it was the right type. I have no idea why this error did not occur when setting were changed via Connect IQ on an iOS device.
  • This is a problem unique to Android, so you won't see it in the sim or on iOS. You'll want to use readKeyInt (FAQ Point #10) or something like it in anything with app settings using Numbers. It's actually been this way since app settings was first introduced in CIQ 1.2.1