Is there any API which can return the device supported color depth? Or do I have to do it the hard way and see if System.getDeviceSettings().partNumber is in this list to know if it is limited to 14 colors?
Is there any API which can return the device supported color depth? Or do I have to do it the hard way and see if System.getDeviceSettings().partNumber is in this list to know if it is limited to 14 colors?
displayName | deviceId | deviceFamily | bitsPerPixel | partNumbers_0_ _connectIQVersion_ |
partNumbers_0_ _number_ |
D2 |
d2bravo | round-218x218 | 4 | 1.4.4 | 006-B2262-00 |
D2 |
d2bravo_titanium | round-218x218 | 4 | 1.4.4 | 006-B2547-00 |
fēnix® 3 / tactix® Bravo / quatix® 3 | fenix3 | round-218x218 | 4 | 1.4.4 | 006-B2050-00 |
fēnix® 3 HR | fenix3_hr | round-218x218 | 4 | 1.4.4 | 006-B2413-00 |
Forerunner® 230 | fr230 | semiround-215x180 | 4 | 1.4.4 | 006-B2157-00 |
Forerunner® 235 | fr235 | semiround-215x180 | 4 | 1.4.4 | 006-B2431-00 |
Forerunner® 630 | fr630 | semiround-215x180 | 4 | 1.4.4 | 006-B2156-00 |
Forerunner® 920XT | fr920xt | rectangle-205x148 | 4 | 1.4.4 | 006-B1765-00 |
Forerunner® 45 | fr45 | round-208x208 | 4 | 1.4.5 | 006-B3282-00 |
Garmin Swim |
garminswim2 | round-208x208 | 4 | 1.4.5 | 006-B3405-00 |
Forerunner® 735xt | fr735xt | semiround-215x180 | 4 | 2.4.1 | 006-B2158-00 |
Edge® 130 | edge130 | rectangle-230x303 | 1 | 3.1.1 | 006-B2909-00 |
Edge® 130 Plus | edge130plus | rectangle-230x303 | 1 | 3.2.0 | 006-B3558-00 |
Forerunner® 55 | fr55 | round-208x208 | 4 | 3.2.5 | 006-B3869-00 |
Descent |
descentg1 | semioctagon-176x176 | 1 | 3.2.7 | 006-B4005-00 |
Instinct® 2 / Solar / Dual Power / dēzl Edition | instinct2 | semioctagon-176x176 | 1 | 3.3.4 | 006-B3888-00 |
Instinct® 2S / Solar / Dual Power | instinct2s | semioctagon-163x156 | 1 | 3.3.4 | 006-B3889-00 |
Instinct® Crossover | instinctcrossover | semioctagon-176x176 | 1 | 3.3.6 | 006-B4155-00 |
There's not an api to get the info, but here you can see what each device supports
https://developer.garmin.com/connect-iq/reference-guides/devices-reference/#devicereference
I have that. Is the spreadsheet I posted visible in your browser? I made it from all the device json files in the SDK. Why do I keep coming across things that should be simple but have been made hard? Has anyone made a resource file with the part numbers and some of their capabilities? It's sounding like I will have to learn how do to arrays in properties.
Can't you use jungle for what you want to do?
I think you're making this more complex than needed. Here's some basics.
-CIQ 1 devices are 14/16 colors = the ones defined with COLOR_*
-MIP devices CIQ 2 of newer are 64
-AMOLD devices are 65536
-Semioctigon (instincts) are 2 color along with the edge 130
-the fr45/55 Swim 2 are 8 color
The colors are mapped to what the device supports. For example, on 8 color devices, COLOR_WHITE and COLOR_LT_GRAY are both white, and COLOR_BLACK and COLOR_DK_GRAY are both black. Say you use one of the 65536 colors on a device with 64 - it will get mapped to the closest color on the device.
----
Devices can have more than one part number - ww vs APAC. You want to use jungles or resource overrides instead. For example, on the instinct devices I use different app settings for them, as instead of allowing multiple colors for different things on the screen, the only real option is a black background or a white background, and then the characters are the opposite.
This is so I can select between a 14 color bitmap and a 64 color one.
As you pointed out even if you didn't mean to, if he API's provided the information they should.we wouldn't have to have rely on our own resource files. All that information is in the device json files, but since they don't provide it through the API then it's safe to say that they won't convert the json files to resource file format either. Unless some kind soul has done that and open-sourced it for us.
you could use a simple function whic return the color palette and use jungle for 64 vs 16 colors devices
Again, with resource overrides using a family you can have different bitmaps based on the color palette.
See the strings sample in the SDK for an example of resource overrides.
Again, why is it on us to maintain the files with the capabilities of the devices? Why are we having to work around the fact that the supplied API is weak?
You are missing the point where there are ways where you don't have to maintaining much more than maybe copying one device's resource override to a new device, adding a line to your jungles file for a new device, etc. or maybe nothing at all. Use the magnifying glass at the top and search this form for similar topics, and you'll see this how it's worked for years and there are different approaches and thousands of published apps that use them.
This is the learning curve I've mentioned before.
Again, why is it on us to maintain the files with the capabilities of the devices? Why are we having to work around the fact that the supplied API is weak?
Keep in mind that people responding are focused on getting things to work as they are.
Asking for things to be the way you want to be is something else. Sure, ask Garmin to fix it. But expect to wait. A long time or forever.