I have some settings for location of the activities counters and also the colour of them.
Since versa lite doesn't support elevation, I wanted to hide these options from the settings if the device is a versa lite, but can't see anyway in the docs to achieve this? Is this possible?
I want a colour picker though that can be hidden based on device.
So there are issues. The 1st is getting the device in the settings. The 2nd is hiding the colour picker
Best AnswerThe recommended way of doing a device-specific conditional is to query the device capabilities using the Device API, communicate that to the companion API, set a setting for the capability in the companion API, then use that setting in the conditional expression in the settings JSX. Phew!
Unfortunately, that process tends to be slow and unreliable. A non-robust work-around is to cheat using info available here.
Best Answer