It used to be that parameters in dynamic pages would stick around if the page was refreshed. A refresh happens when a user leaves the app, or the phone goes to sleep, and then the user comes back to SmatThings app and the current page refreshes without parameters.
param.number = 1 (works if just entering page) after automatic refresh…
param.number = null (Param no longer available) go back one page, then forward to the original page
param.number = 1 (As normal)
This is ruining the usability of my smart app, causing settings to be set incorrectly. Can anyone help? Pretty sure this is a ST bug, as it used to refresh with current parameters intact in the past.
Not having that issue with any of my dynamic pages, an I have one app that has dynamic pages based on dynamic pages…
Post up the dynamic page in question?
Do a log.debug on the params map, I had an issue a month ago where the path to the params key was different between ios and android IE android: params.params.myParam and on ios params.myParam,
I got around that with this bit’o defense, and it was noted as a bug, don’t know if it got fixed or not.
I thought I’d do that too, but it turns out params is completely null in the case of a refresh. It seems like the params.params problem has been fixed though.
So from a debug standpoint, I don’t think this a problem with parameters itself rather than the extra refresh on iOS vs android. When resuming the app on andriod, the page does not refresh at all. When resuming on iOS, the page has an extra refresh which doesn’t bring along the original params.
From a developer’s perspective, it’s extremely frustrating to account for different ST Mobile client quirks. We deal with enough device level quirkiness already.
For sure. I’m thinking about loading the page parameters into state object as like state.lastParameters so that I can load that up in the case that parameters are missing on a page refresh. Might get me around this particular bug…