Multiple Edge Datafield in the same project

Hi there,

is it possible to have multiple DataField within the same project? 

So you can develop and build those in one shot but, when configuring Edge Screen Layout, you can pick them separately.
Let's say I am building a DataField around cardio data (HR, Zones, etc) and another DataField around Cadence/Power data. 
Should I create 2 different projects (each with its own manifest.xml, Class extending AppBase and so on...) or can I put everything in the same project and change the manifest entry point? 

Thanks!

  • No you can’t have multiple CIQ data fields (or any other type of CIQ app) in the same project.

    Should I create 2 different projects (each with its own manifest.xml, Class extending AppBase and so on...) or can I put everything in the same project and change the manifest entry point? 

    Yes, create 2 different projects, each with its own manifest.xml, etc.

    It isn’t possible to only have one manifest.xml, because (for example), each app needs a distinct UUID. Conceivably you could edit the UUID in the same way you propose to the edit the manifest entry point, but it’s not really a good idea.

    If you have common code between the 2 data fields, you should look into ways to share code between multiple projects, as opposed to trying to use 1 project for multiple apps.

    Some CIQ-specific ways to share code amongst multiple Monkey C projects:

    - use Monkey Barrels

    or

    - in each project’s monkey.jungle, override sourcePath (and/or resourcePath) so that the project includes folders from both the default locations and also the shared location

    e.g. Suppose you have the following folder layout for two projects and a common source/resource folder:

    |— project1/
    |        |
    |        |——— source/
    |        |
    |        |——— resources/
    |        |
    |        |——— monkey.jungle
    |
    |— project2/
    |        |
    |        |——— source/
    |        |
    |        |——— resources/
    |        |
    |        |——— monkey.jungle
    |
    |— common/
             |
             |——— source/
             |
             |——— resources/

    You could add the following lines to monkey.jungle in project1 and project2:

    base.sourcePath = $(base.sourcePath);../common/source
    base.resourcePath = $(base.resourcePath);../common/resources

    In VS Code, open project1/, project2/ and common/ as 3 separate “projects” (although only the first two will be actual buildable projects), using a multi-root workspace: https://code.visualstudio.com/docs/editor/workspaces/multi-root-workspaces

    Some other generic, yet somewhat advanced, ways to share code amongst multiple projects would include:

    - using symlinks to link from multiple projects to a common shared source folder

    or

    - using git submodules

  • I use more or less this. It works but not perfect, because either VSC or probably the Monkey C plugin don't really like the way I do it. I do use a mix of having ../ path in the jungle file and symlinks.