My application starts from the welcome screen, but on this screen it is possible to skip this screen in future launches.
What is the correct way of Android? Initially, I just automatically discovered skipWelcome's preference and switched to 2nd activity with a greeting. But this led to the user clicking the "Back" button on the welcome screen, which we promised never to show again.
Right now, in the greeting activity, I read the preference and call () settings for the current activity:
SharedPreferences preferences = getPreferences(MODE_PRIVATE); boolean skipWelcome = preferences.getBoolean("skipWelcome", false); if (skipWelcome) { this.finish(); }
And then I implement onDestroy to go to the next operation:
@Override public void onDestroy() { super.onDestroy(); startActivity(new Intent(Welcome.this, StartFoo.class)); }
But this leads to some weird visual transitions. I'm starting to think that I need a basic activity that pops up. Welcome only if it is correct and then goes to StartFoo.
Kevin source share