Is it possible to reset preferences from a tile action method?

Because I want the user to see the reset when it’s done.

What I am trying to do is provide the user with a “Reset Factory Defaults” tile.

This would change all the settings back to factory defaults. That part is easy doing as you say by using a second set of values, in my case I just hard code them But when the reset is done I want those values to be reflected in the preferences page if it is opened.

So for example I mentioned Illumination Report Interval. Out of the box the value is 0 which saves batter by never reporting on a schedule, instead it reports when the illumination changes a certain amount. (Another param settings controls this amount) If the user changes this to 300 (every 5 min) and leave the preferences page. If at a later time they select “Reset Factory Defaults” I would like when they open the preferences that they see “0” and not 300. I can’t find a way to change the value back to the default so it is correctly displayed.

2 Likes