Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Settings that vary depending on attached Device

ANSWERED

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?

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

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.

Peter McLennan
Gondwana Software

View best answer in original post

Best Answer
2 REPLIES 2

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.

Peter McLennan
Gondwana Software
Best Answer

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!

Best Answer
0 Votes