Resource folders for watch apps...

For a watch app I need to use some different bitmaps and strings with Vivoactive HR device. I tried copying resource folder and renaming it as resources-vivoactive_hr and did the needed changes in bitmaps and strings. Other folder structure is same as the original resources folder. The structure is like this:


However, when I run it in the simulator with vivoactive_hr or tall_watch profiles it use the old bitmap and strings. I did the same in a watchface and it seems to work, but not in an app. Is using different resource folders usable only for watchfaces or is there another issue?
  • What I do, is have none of the "non-common" stuff in the resources directory, but have resources-vivoactive, resources-vivoactive_hr, etc. where I put anything device specific. It probably should work to have defaults in resources and then only over-rides only where needed, but I'm in the habit of keeping anything device specific in a device specific directory.

    And anything common only exists in the resources directory, so for example, my properites and strings are only there.
  • For all device models I want normal resources folder to be used, as it was before. However, for vivoactive_hr I need different bitmaps. So created resources-vivoactive_hr/drawables/ and put the drawables.xml and xxx.png files inside it. However, it didn't work, it said strings.xml etc. weren't there. Put menu and strings folders too, then no error but simulator doesn't use them then. I use different text strings for menus but only the old strings appear.
  • Former Member
    Former Member over 9 years ago
    Would you be willing to send your project files to [email][email protected][/email] so we can take a look at what's happening. Based on your description it sounds like what you're trying to do should work.

    You can take a look at the disc golf sample on GitHub which is a watch-app that uses resource overriding. That might help you figure things out if it's a structure/resource definition issue (again, it looks like you have things setup correctly).

    Edit: please include a link to this forum thread if you do send an email so we know the origin.
  • Would you be willing to send your project files to [email][email protected][/email] so we can take a look at what's happening. Based on your description it sounds like what you're trying to do should work.

    You can take a look at the disc golf sample on GitHub which is a watch-app that uses resource overriding. That might help you figure things out if it's a structure/resource definition issue (again, it looks like you have things setup correctly).

    Edit: please include a link to this forum thread if you do send an email so we know the origin.



    I was going to send an email but I think it's an issue with my particular software setup. I run the Eclipse and CIQ SDK on Wine on Linux, and maybe it's a problem with my environment.
    When I tried the same with creating resources-square_watch it worked, but not only for tall watch profile but also all the others. I try to create new projects and those have the same issue too. So my environment has an issue with prioritizing the resource folder or sth. like that.

    Anyway, instead of using resource folders I think I'll include all bitmaps in the generic resources folder and load them during initialization of the app depending on the device resolution. It'll increase the app size but should be the same in other ways.
  • I think I'd still zip and send the project to Ken, as I doubt it's due to your setup, and in the long term, you don't want to carry bitmaps for all device in the same .prg.

    One thing to consider with an watch-app is "launcher_icon", as it's got to be set for the target at compile time, and you can only have one. And it's sized differently for various devices (it's used before your app even runs). That's a case where you want to get your current setup to work, so the icons look ok on all devices.

    For launcher_icon you can just have the icon sized so it will compile for all devices, but on some devices, it may look odd when compared to other icons.. (and maybe very small!)

    For devices a developer doesn't have and they do watch-apps for, I submitted a suggestion that within the simulator, a function be added where the developer can see the launcher_icon as how it would look given the allowed size on devices.

    Launcher_icon is actually the main reason I do resource overrides based on device. :)
  • I think I'd still zip and send the project to Ken, as I doubt it's due to your setup, and in the long term, you don't want to carry bitmaps for all device in the same .prg.

    One thing to consider with an watch-app is "launcher_icon", as it's got to be set for the target at compile time, and you can only have one. And it's sized differently for various devices (it's used before your app even runs). That's a case where you want to get your current setup to work, so the icons look ok on all devices.

    For launcher_icon you can just have the icon sized so it will compile for all devices, but on some devices, it may look odd when compared to other icons.. (and maybe very small!)

    For devices a developer doesn't have and they do watch-apps for, I submitted a suggestion that within the simulator, a function be added where the developer can see the launcher_icon as how it would look given the allowed size on devices.

    Launcher_icon is actually the main reason I do resource overrides based on device. :)


    I zipped everything and sent an e-mail. Launcher icons weren't a big problem for me but with so many different screen sizes, it's getting hard to keep up with new devices. Hope they don't continue to increase screen models, triangle screen etc. :D
  • Former Member
    Former Member over 9 years ago
    I zipped everything and sent an e-mail.


    Just FYI, I have not seen a message in the inbox yet. Not a big deal from our end but don't want you to think we're ignoring you.