Can set device.preferences.<name> programmatically?

I wanted to use a device preference to communicate something back to users. So I tried to use = "My message"

However, I don’t see my message in that preference field… I am assuming this is expected behavior… Is there any alternative way to communicate information to users?

1 Like

You can not set preferences from code and have them update on the Settings page in the app.

The only way to relay information to a mobile user is with capabilities. Create or reuse one that displays text in the detail view of the UI.

I’ve often wished we had some text areas in the Information menu option that were semi dynamic or at least settable from code. Driver version information. How to exclude/include. Last battery change timestamps, stuff like that. Things you don’t need in the detail view of the UI, but more details (dare I say, information) about the device.


One approach is to create an info capability with this information, and show/hide it based on a setting. The setting can switch between profiles.