Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70920

Making a screen that appears only upon first time opening the app. The second time that the user opens the app, that screen wont appear again

$
0
0

Hello :slight_smile: 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 :slight_smile:

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 70920

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>