Refresh the data field

Hello,

I'm new in the Garmin world, so perhaps my question is a litle but stupid... Let me know...

I have wrote a DataField that made exactly want I want on my new fenix 6x pro and I wanted the add some custonization.

For that, I add the the AppBase a function getSettingsView that allows the user to change some settings, as color for example. I put the color choosen in the Storage

My question is, how it's possible to refresh the data field to have the new color choosen ? The onSettingsChange function in the AppBase is never called...

And make, in the data field onUpdate method, a call to get from the Storage the new color is, I think, not a good idea...

Somebody can help me ?

Thanks you

Frédéric

  • Real device at least with WFs.  Have you tried on device settings on a real device?

  • No, unfortunately I don't own a CIQ 3.2 device. I would be really curious to see how it works with a data field on a real device.

    Thanks for that detail! Personally I find it valuable to hear about these undocumented differences/quirks, although I wish they were documented and/or accurately modelled in the simulator.

  • Give you an example with a watch face with on device settings.  To get to the settings, you go to the watch face picker, and when you see the target watchface, you have a chance to customize it.  Then you leave the picker. and the WF runs in it's normal way.

    It's really nothing new, as it's been the same when you customize native watch faces for a long time.

    The only time I've seen you can do on device customize for a DFs is when you first add it to a data screen, but I've not looked at this in some time and it may have changed.

  • Sure I get how native on-device settings work. My question is about CIQ 3.2 on-device settings and your statement that the app restarts after the application-defined view is popped.

    My point is the CIQ 3.2 custom on-device settings feature initially seems like it could be a very powerful way to push an *arbitrary* view which doesn't necessarily have anything to do with settings. e.g. It could be lap history, or a map, or any number of alternate views.

    None of that works if the data field has to restart after the view is popped, though.

    For a practical example, I have a full-screen datafield app whose normal view is 6 fields of the user's choice. The app also has a way to show lap history, but it's very clunky to switch views -- user has to press a key sequence such as UP, DOWN in a fairly short amount of time.

    I wanted to use on-device "settings" to push the lap history view for an improved UX on 3.2 devices, but based on what you said, that seems like a non-starter.

    The analogy with native views is that the native navigation map on 935 has a Pan/Zoom menu which doesn't take you to "settings", but it takes you to a separate map view which can be panned or zoomed using the UP, DOWN and START keys (none of which can be used for those purposes in the default data field view, obviously.)

    If someone wanted to implement something similar in a data field app, it's likely they wouldn't want the app to restart after exiting the Pan/Zoom view.

  • I tried to activate the traditional settings but it's not working. I rode the core topics about app settings, but I don't see anything if I use the Garmin Connect Application. No settings available in my Data Field... I just added a properties.xml file with settings tags inside... What did I missed ?

    Thanks 

  • If you want to test traditional app settings on a sideloaded app, the app has to be published to the store. For testing purposes, you can check the "Beta App" checkbox which hides the app from everyone except you (the author).

    https://developer.garmin.com/connect-iq/core-topics/beta-apps/

    As mentioned in ^ this article, you need to use a different UUID for your beta app and the real app which you will eventually publish.

    Also, not to state the obvious, but each setting has to have a corresponding property (which I assume you have).

    EDIT: As Jim pointed out, you can also use the App Settings editor in Eclipse, which is probably the preferred method of testing settings. But obviously that doesn't work with a sideloaded app on a real device.

    I don't publish beta apps unless/until I need to test the app on a real device. But you'll probably want to do this at least once for any app with non-trivial settings, before you publish it for real.

  • See the New Developer FAQ:

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

    You can test them in the Sim using the App Settings editor in Eclipse.

  • How can I export the App with VSCode ?

  • Use the command palette (CMD-SHIFT-P / CTRL-SHIFT-P) > "Monkey C: Export Project".

    All of the Connect IQ commands start with "Monkey C". In this case you could just type "CMD-SHIFT-P, export" or "CMD-SHIFT-P, monkey"