Glance: how to deal with System 3 devices

Hi,

I have a widget-type app with a glance and would like to make it available also for System 3 devices, which do not support glances.

Right now I get a lot of compiler warnings that the (:glance) annotation is not supported and will be ignored. Right now I am just ignoring the warnings, but is there a better way that avoids the warnings?

Thanks!

Regards, Robert

  • I just ignore that warning.  Same as I ignore the warning about the launcher icon being resized.

  • Actually my mild OCD forced me to make launcher icon and other icons in my app in a particular size for each device (family). I have scripts for that, so it goes pretty smoothly.

    But it would be great to be able to get rid of those warnings, because there are many of them in the build process, and probably because of them I'd miss other warnings that I would like to take care of.

  • I really don't understand that warning, as the compiler does resize the given icon to the required size. If I was Garmin I would probably only display that warning when the image has to be sized up

  • I really don't understand that warning, as the compiler does resize the given icon to the required size.

    Maybe bc they think you won't necessarily like the result of auto resizing, or that they feel obligated to let you know it's happening. After all, it is a warning and not an error.

  • Yeah, I tend to use svg if I can, and so far the results were OK, and since this happens in compile time I hope it's really OK even for old devices. I did some changes in the very few colors I used in these icons so even the devices with only 8 colors have the exact color for them. To support monochrome devices is another issue.

  • Yeah, I tend to use svg if I can, and so far the results were OK, and since this happens in compile time I hope it's really OK even for old devices.

    Can you use SVG directly with the Connect IQ SDK?

    So far I have SVGs as basis, but have scripts that generate PNGs in the right size for each device that I support.

  • <drawables>
    <bitmap id="LauncherIcon" filename="launcher-icon.svg" />
    </drawables>
     
    This seems to work. Every device compiles (with the same warning) and in the devices I own I can see the icons as they should be.
    In another app I even have:

    <bitmap id="LauncherIcon" filename="launcher-icon.svg" automaticPalette="true" dithering="none" />
    and also for an image I use in the app:
    <bitmap id="goal_alert" filename="goal-alert.svg" automaticPalette="true" dithering="none" scaleX="20%" scaleRelativeTo="screen" />
  • I took a look at this now. I was hoping that the SVG will be included in the binaries and I can scale it at runtime. But from the documentation it seems that at compile time the SVG will be converted to a bitmap, and then if you'd use the scaling of drawBitmap2() it would be bitmap scaling again. So instead it is necessary to have one bitmap resource for every size needed.

    In that it is similar to the solution I built for myself, a script that generates PNGs for every device type or family. I use command line inkscape for generating the PNGs, would be interesting to compare the quality of the resulting bitmaps to what Garmin generates. Maybe I'll migrate my solution to the built-in Garmin solution in the future.

  • I would also be interested. My bet is that your script will have better results, if it's written well, and gives the right parameters to inkscape, and your input svg-s are also optimized to the "task". I personally used sone svg-s and then let the compiler scale them and I looked at how they look in the simulator on different devices (in particular on devices with different number of colors / different color palette) I had to fine-tune both the parameters in the drawable xml and the colors in the svg (to match the color palette that ALL devices have) It's not a trivial task. However assuming you understand how all this works, and putting all that knowledge into the script it can be possible to generate pngs for each device that then will look "the same" on the device as you see it on the monitor of your computer. Though even just looking at my fenix6 and the it's color palette on the computer made me realize that things are even more difficult. For example I used this app: https://apps.garmin.com/apps/44cb7384-f0d2-4ea3-8c73-750ede036c8c to look at all the 64 colors and how they look on the actual device, and I can tell you that they look very different than what I thought, based on how the same RGB colors look on my monitor. I think this is probably because of the MIP display technology. Because of this I think it's sometimes hard to find the right colors when we use the simulator. In apps where colors are important this has to be taken into account. I think amoled displays look more similar to our monitors (probably because the technology is more similar)