I wanted to follow up with what I did to address this.
Because variables are not stateful across screens, when you close a screen you lose everything there, (unless you store it in a persistent system like TinyDB etc)
What I needed was a way to restart the process of my app, without all the welcome crap. But I needed it to be a clean start.
Here is what I did:
I setup a custom notification process so that if the New User button is clicked, it gets here. I have two things going on here.
First : I have Firebase Stats on the system so I can track the number of times individually and globbaly this process is called.
Second: I pass a value to the new Screen.
Now on NewUser screen, this is how I set it up.
- I set a slight delay to make sure that all the code is loaded for that screen.
- I turn the timer off. This is critical, otherwise it will loop for a while trying to figure out what to do.
- Now I assess the startValue. If it is 1, then I know where it came from. If not, well for now I close the app.
- If it is 1, I can close the screen, and go back to loadup screen 1, and I do so with a new starting value. This allows me to change my startup routine.
Now I can assess if the Screen had a start value, and slightly change my startup process so the user does not think the app restarted.