Associate a resources folder with more than one kind of watch

I would like to add the support of the Fenix 3 HR to my application.

I already have a custom resources folder for the Fenix 3 named "resources-fenix3" (among other folders such as "resources-fr630" or "resources-vivoactive"). How can I make the Fenix 3 HR use the same resources folder as the Fenix 3? I already tried "resources-fenix3-fenix3_hr" but it does not seem to work. Of course, I don't want to duplicate the folder.

More generally how do you associate a resources folder to more than one kind of watch?

Thanks.
  • I've never see a way to use the same resources directory for multiple target devices. When the fr230, fr235, and fr630 came out, I was looking for a way to avoid having the three different directories. I was hoping that you could string the targets together after resources- as you tried, or that the concept of a "device family" might be available (using something like "resources-semi_round_devices"), but there was nothing. So I just have the multiple directories for the specific targets.
  • You should be able to use filesystem links to resolve this. If you are on a modern windows platform, you should be able to use the mklink utility to create a directory link from an elevated command prompt...

    C:\connectiq-sdk-win-1.2.4\samples\Sensor>mklink /d resources-fenix3_hr resources-fenix3
    symbolic link created for resources-fenix3_hr <<===>> resources-fenix3


    Now anything you do to resources-fenix3 will apply automatically to resources-fenix3_hr, which is what it sounds like you want.

    If you find that you need to do something specific for a device, but everything else is the same, you can use mklink to link all of the files from one folder to the other, except those files that you want to make unique.

    Travis
  • Travis - I forget out using links in windows! I'd do that on *nix for sure.

    Have you see any issues with them on windows with various backup/restore schemes (non MS), and maybe import/export in Eclipse?
  • I don't know what tools you use, so it really depends. I use perforce for revision control, and perforce handles file links just fine...

    C:\Development\Projects\zz>mkdir resources-fenix3

    C:\Development\Projects\zz>echo. > resources-fenix3\strings.xml

    C:\Development\Projects\zz>mkdir resources-fenix3_hr

    C:\Development\Projects\zz>mklink resources-fenix3_hr\strings.xml resources-fenix3\strings.xml
    symbolic link created for resources-fenix3_hr\strings.xml <<===>> resources-fenix3\strings.xml

    C:\Development\Projects\zz>dir /s /b /a:-d | p4 -x - add
    //depot/zz/resources-fenix3/strings.xml#1 - opened for add
    //depot/zz/resources-fenix3_hr/strings.xml#1 - opened for add

    C:\Development\Projects\zz>p4 opened ./...
    //depot/zz/resources-fenix3/strings.xml#1 - add default change (text)
    //depot/zz/resources-fenix3_hr/strings.xml#1 - add default change (symlink)

    C:\Development\Projects\zz>


    Travis
  • Thanks for your replies.

    I thought about symlinks but as far as I know, they are not well managed by Git (the SCM I use) across OS.

    I am disappointed that a more elegant solution is not available for such a common problem. I hoped I was just missing something from the ConnectIQ SDK documentation.
  • Garmin team, do you plan to address this issue in a future release?

    I really don't want to duplicate same resources in different folders.
  • Former Member
    Former Member over 9 years ago
    I seem to remember sharing resources. I've been out of the loop for a little while, but pretty sure this used to work...

    Any required resource will be looked for up the tree. So for both F3 & F3HR you should be able to place the resource in the "resources-semi_round_watch" folder. Or you could move them further up the tree to the "resources" folder.
  • sharkbait_au is correct that you can specify resources for a generic screen type (e.g. resources-round, resources-tall_watch) and the resources will be applied to any device that has that general screen geometry. But we don't currently have a way to define a family of devices or a subset of devices based on other criteria.

    For example, if you want to target only fenix 3 and fenix 3 HR, but exclude any other round screen devices (such as the D2 Bravo), you must specify resources for the two target devices separately. Using 'resources-round' would apply to all round-screen devices, so isn't an option in this case.
  • Doesn't seem to be working in SDK

    For example, if you want to target only fenix 3 and fenix 3 HR, but exclude any other round screen devices (such as the D2 Bravo), you must specify resources for the two target devices separately. Using 'resources-round' would apply to all round-screen devices, so isn't an option in this case.


    This doesn't seem to be working for me, the folders are simply ignored in the build targets for devices that target them (but they work if I build for a "round" watch, etc. Building for a device target just uses the base resources folder, ignoring the screen specific folders. It works perfectly if I create device-specific folders however.

    I also tried creating folder aliases inside eclipse (New folder -> Advanced -> Link to Alternate Location), and the folders and links work perfectly within eclipse, but are ignored when building run targets for devices.

    With the number of devices proliferating, but often sharing resolutions, I hope this is addressed soon.