03-22-2019 22:46
03-22-2019 22:46
Is it possible to have settings appear differently depending on which device is connected? The Device screen-size approach for the Ionic doesn't apply for the Versa-Lite (having the same screen size as the Versa). Are there other device-info parameters?
e.g. Can I have a different set of color options appear when the Versa-Lite is connected than those displayed when a Versa is connected. It would be useful in some of my apps to have the settings associated with elevation gain not appear for Versa-Lite users. Currently, I have to say that it is N/A on the Lite. (Not ideal) I can use a generic description when the floors display is replaced with another, but not when it simply does not apply.
I tried using an if statement and duplicating the option list with 1 less option. However, I cannot import the Barometer to determine which Versa is connected. Any ideas?
Answered! Go to the Best Answer.
03-22-2019 23:35
03-22-2019 23:35
The recommended way is for the device app to send a message to the companion to notify of its capabilities. The companion then adapts its settings appropriately.
That's a bit painful though, and can result in a questionable user experience since it can take a noticeable period of time before the message comes through. A lazier approach is to use the peer API.
03-22-2019 23:35
03-22-2019 23:35
The recommended way is for the device app to send a message to the companion to notify of its capabilities. The companion then adapts its settings appropriately.
That's a bit painful though, and can result in a questionable user experience since it can take a noticeable period of time before the message comes through. A lazier approach is to use the peer API.
03-23-2019 13:40
03-23-2019 13:40
Thanks for that - still being a learner, I now need to figure out how to get that
device.modelName
information into the settings and access it!