I have a datafield app specifically for Edge devices. I'd like to reset my datafield values upon activity save/discard. Currently, I'm doing manual resetting of all fields inside the Datafield.onTimerReset() method. It works but it sometimes takes too much time to reinit values, so I decided to try just System.exit() inside the onTimerReset() method to let values self init upon the next app start.
Surprisingly, it does not work - after hitting Save/Discard buttons on the Edge device my datafield still displays data from the finished activity which means that old values are still in memory.
I added a simple debug println statement and ran the app in the sim
// Triggered on timer reset.
public function onTimerReset() as Void {
if(true) {
System.exit();
}
System.println("Still alive!");
}
and it printed out