To support all devices - which resources should I add?

Hi,

What is the relation between the following 2 generic device profiles

square_watch
round_watch

and the following device specific profiles

square faces
=========
fr920xt
vivoactive
fenix3

round faces
=========
epix

I have found that the simulator will load the resources-fr920xt if compiling for fr920xt, but it will load the resources-square_watch on the actual 920xt watch, thus ignoring the resources-fr920xt.
It took me a while to discover why the watch wasn't picking up changes I made in the resources-fr920xt :(

Are the square_watch and round_watch generic profiles (compare to base classes)?

I read somewhere you need a prg per device. Does the .iq file contain various prg files then?

I do not want to create unnecessary resources, so was wondering if I could achieve compatibility across the full product spectrum by just having two resources:

resources-square_watch
resources-round_watch

Or do I need the device specific resources but not the two generic ones?

What is the best practice?

H
  • Former Member
    Former Member over 10 years ago
    What is the relation between the following 2 generic device profiles

    square_watch
    round_watch

    and the following device specific profiles

    square faces
    =========
    fr920xt
    vivoactive
    fenix3 epix

    round faces
    =========
    epix fenix3


    The round and square watch were added as generic watches to the SDK before any of the Connect IQ compatible devices were announced. The happen to have the same characteristics as the fenix3 and vivoactive but they cannot be used to generalize for all devices (for example, the screen orientation, size and colors could vary between different square watches).

    I have found that the simulator will load the resources-fr920xt if compiling for fr920xt, but it will load the resources-square_watch on the actual 920xt watch, thus ignoring the resources-fr920xt.
    It took me a while to discover why the watch wasn't picking up changes I made in the resources-fr920xt :(


    If this is happening it's a bug. Resources with a device qualifier of "square_watch" shouldn't be applied to a 920. I'll file a ticket to look into this. You can work around this bug by not having "square_watch" resources.

    I read somewhere you need a prg per device. Does the .iq file contain various prg files then?

    Yes

    I do not want to create unnecessary resources, so was wondering if I could achieve compatibility across the full product spectrum by just having two resources:

    resources-square_watch
    resources-round_watch

    Or do I need the device specific resources but not the two generic ones?

    What is the best practice?

    You need device specific resources. As mentioned above, the size, orientation, screen colors, bit depth, etc can vary between different round or square watches. You really shouldn't ever use a round_watch or square_watch resource unless you're just playing around with some APIs for testing purposes. Removing them from the SDK has been brought up but I don't really think it's a priority.
  • I just discovered that if there is no square_watch resource, my 920xt watchface does not load at all.
    This specifically applies when manually copying the prg from bin to apps folder on watch.

    I want to test the prg from the .iq file, but there are many folders. Which one is the fr920xt folder?

    006-Bxxxx-xx
  • Former Member
    Former Member over 10 years ago
    General compiling defaults to the square_watch if a device isn't specified which is why you're seeing square_watch resources by just copying the .prg file from the bin folder. If you're using the Eclipse plug-in I would recommend looking at the Build For Device Wizard (Connect IQ > Build For Device Wizard...) which will specify the device you're trying to compile for when building.

    If you're curious about the folder to use from the .iq file you can open the manifest file and see which folder is mapped to by the 920 device entry (filename attribute).