Resources for Device Type

Hi,

I have defined resources for certain devices (like Vivoactive), but how do I now define resource for certain device types (like round watches).

I've tried creating a folder called 'resources-round_watch' but round watches like fenix are not picking up.

Thanks
Chris
  • You can't use a generic name (like round_watch)

    you have to do something like:

    resources-fenixchronos
    resources-fenix3
    resources-fenix3_hr


    for the devices you want to support

    What you can do is have something like resources_round, and then have the things like resources_fenix3 being links to resources_round so the files actually only exist in one place
  • Thanks Jim, I suspected as much - just needed the confirmation.
  • Former Member
    Former Member over 8 years ago
    Actually you can define resources for more generic groups of devices using the family qualifiers. Take a look at the Family-based Qualifiers section of the Programmer's Guide.

    project root
    resources <-- Completely generic, applies to all devices
    resources-round <-- Applies to all round devices
    resources-round_218x218 <-- Applies to all round devices with a screen resolution of 218x218
    resources-fenix3 <-- Applies to only the fenix 3
  • Thanks Ken, that works a treat.
  • Wow Ken! I never noticed that before! When did the family qualifier come about? Is it a 2.1.x SDK thing?
  • Former Member
    Former Member over 8 years ago
    Wow Ken! I never noticed that before! When did the family qualifier come about? Is it a 2.1.x SDK thing?


    I think so. I think it was mostly working around the 2.1.0 beta but was technically a 2.1.1+ feature. I can't remember the specific timing.
  • According to the documentation resource qualifier are supposed to be separated by hyphens. I believe that resources-round_218x218 should be resources-round-218x218. I haven't had a chance to try this yet, but my current pet project will be using family-specific resources.

    Travis
  • According to the documentation resource qualifier are supposed to be separated by hyphens. I believe that resources-round_218x218 should be resources-round-218x218. I haven't had a chance to try this yet, but my current pet project will be using family-specific resources.

    Travis


    I'm currently using these two in mine:
    resources-rectangle-205x148 (covers epix, 920xt, and vivoactive)
    resources-semiround-215x180 (covers a bunch of things)