Complex external configuration?

I've understood that there is a mechanism for external configuration of the Connect IQ apps which are then automatically synchronized to the device. My configuration, however is shaping of to be a bit complex (1:n relations, nested to several levels) so I'm skeptical that the normal editing UI is practical.

Is there some way of syncronizing a general file (configuration JSON) associated with the app or how have you generally dealt with the situation? Of course I can always provide a custom URL and host it on github etc but it sounds a bit hackish...

  • Without knowing what makes this complex, the most straightforward way would be to use app settings, and then maybe look to see what could be done to make it clearer to the user.  App settings aren't dynamic, in that the UI can't be changed based on a specific setting - you always have all settings

    When you look at pulling down a config from elsewhere, you add in things like being able to have a config per user/per device (a user may have more than one device).  Also your app needs to request the config when needed, and handle the case where comm isn't available (no phone, an error, etc).

    Another option in the case of a device app is to use Menu/Menu2 so you can have a top level menu, and based on what's selected, different menus or pickers under that and so on.  You can then save the config settings in Application Storage.This could be an issue if you're tight on memory.

    I'll usually use app settings, but may add something with local menus for this that may vary while the app is settings.  How you do things is really based on your app itself.

  • Have you used app settings before?  If not, maybe download some apps from the store just so you can see how others have set up things.

  • Default app settings is not user friendly for complex setups. For some kind of settings I have chosen the "config from elsewhere", thus my web app displays cleary all the possibilities but as said Jim it asks much work; a web app, a database to store settings, and a comunication watch->web app.

  • No, I haven't used settings before, I'm on my first app. I was thinking about situations where e.g. you can define arbitrary number of power zones with different limits, colors, fonts etc. I'm doing the app mostly for myself so I'm not even sure if it ever ends up in the store.

  • Would the SDK allow for me to send a BASE64-encoded message containing the configuration JSON to my phone and the app would subscribe to messages and use the config? ;-)

    Next step would of course to build a native phone app that does speech recognition and controls the app, bike lights/shifting etc...

  • That's where doing a menu based config in the app itself might be easier.  The drawback is the memory needed for something that's not used all the time.

  • You may be mixing up a companion app and app settings from GCM/Connect IQ here.  You might have an app that generates a sting on the phone, and then copy paste that into app settings as a string.

    Can you provide an example of what type of setting you're looking at?

  • Yes, using the default settings is easier, but it s possible to use a web app.

    A communication class (watch side) needs about 4ko, having many entries in app settings costs a bit memory too, with all new entries you have to add in string.xml file.

    the advantage of the web app is that it is an open door to many new ideas.

    But it s depend on your project and the time you want spend.

  • Yes it could be a first step. but there are 2 inconvenients for your final product

    1- copy paste is not user friendly

    2- what happens if a user modifies manualy the string in settings? checking all errors cases can ask memory too

    -> it depends on your project

  • In the communication module there is a method to send and get data (json for instance) makeWebRequest. You can too choose to create a android and an apple apps but this is much more work.