SimpleDataField: update label; package different .prg into the same .iq

Former Member
Former Member
I actually have 4 questions, but didn't want to start a thread for each of them:

1) I was wondering whether it is possible to update the label of a SimpleDataField? Currently it seems not to work when settings label to a new value inside the compute() function. I have an application that shows 7 different values and cycles through them. I can paint the labels and data myself using just DataField, but my DataField is already 14KB and when adding support for the Fenix3 with it's different layouts, then it won't fit into memory anymore.

2) can I package different .prg files into the same .iq? A simpler one for vivoactive, epix and Fenix3 and a more complex one for the fr920xt? The same reason is the 16KB limit.

3) If SimpleDataField would override onUpdate(dc), then I could paint special stuff for example in a 1-field layout and in all other fields I would use the default behaviour of the SimpleDataField.

4) Will a future firmware version support settings (over mobile phone for example)? Then I don't have to duplicate the datafields to supports numbers in km/h or knots.

Thanks and greetings,
Mete
  • Former Member
    Former Member over 10 years ago
    1. The label is only fetched once when the data field is loaded, so it cannot be updated dynamically for a simple field.

    2. It probably works. I don't think I can recommend it, but if you are careful it seems fine.

    3. The system does not call onUpdate for simple fields.

    4. Yes (via Garmin Connect Mobile).
  • Former Member
    Former Member over 10 years ago
    Thank you for the fast answers! If the Fenix3 support doesn't fit into the 16 KB limit, then I'll try 2). I saw that when unzipping the .iq files it contains individual .prg files for each product. So it might works. It's difficult to test though.
  • More about #2:

    Technically, this should work, but I also would not recommend this. To do this you would need a project for each device that is not common, would need to generate each device's PRG separately, and then assemble the .iq file yourself by including a manifest.xml and zipping up all of the files together.

    The end result would be a single upload to the store by the developer rather than one for each device, but ultimately more work and potentially complex maintenance. From a user's standpoint, there would be very little difference. I think it's safe to assume that most users only own one Connect IQ device, so would only ever be concerned with the version for their specific device.
  • Former Member
    Former Member over 10 years ago
    From a user's standpoint, there would be very little difference. I think it's safe to assume that most users only own one Connect IQ device, so would only ever be concerned with the version for their specific device.


    Hm, that's a good point. Now I think it is better to do just two .iq packages. One for vivoactive, epix and Fenix3 and one for fr920xt. I just didn't want to spam the app store with all kind of different versions. Thanks!