Hello I am struggling with creating a feature in my app. I wish to make an “Welcome” screen in my app that appears only the first time that the user has opened an app and then never again.
So what I’m struggling with is how to approach making this feature… my plan is to create a page component with a button to navigate to the login screen. But what I don’t know is how save that state that his screen has already been seen by the user and the app should not load it upon second time opening the app…
I am assuming that
1.) I need to make a service that will get and set data in the storage memory (Do I use the capacitor PREFERENCES for this or ionic storage?)
2.) I need to check if there is welcomeScreenShown
variable set in the storage, and read it’s value. (How and where?)
3.) if it’s false, then display the welcome screen and then set the welcomeScreenShown
to true
, so next time the screen won’t be displayed and it will reroute the user to the homepage
Is this correct? Has anyone done such a thing and could someone provide some code for reference?
Thank you all so much
1 post - 1 participant