Reputation: 216
I implemented an app intro which when first launched, takes the user through an introduction of the application.
This app intro only shows at the initial first launch of the application and ceases afterward. Is there a way I can implement my splashscreen to where the splashscreen will launch for subsequent launches?
Upvotes: 0
Views: 387
Reputation: 37729
Here're my recommendation:
onResume()
method of Splash screen, look for a boolean in your
SharedPreferences
against a key (let say "isFirstLaunch"
)
indicating if the into has been shown before or not. If not, this is
your first launch.onResume()
of Splash activity, and override Intro Activity's
onBackPressed()
or onDestroy()
or finish()
or inside your
custom button click listener to save the boolean into
SharedPreferences
indicating it has been shown.This way, managing from Splash screen is easy.
Upvotes: 2