So far, I have a class which directs a user to a particular class upon completion of the splash screen.
What I'd like is, for the splash screen class to direct users to one class upon primary page load. But if the user revisits the splash screen, I'd like it to direct the user to the most recently used class (other than the splash screen class)
How do this?
The purpose of this, is so if the user moves the application to the background,then when the application is brought to the foreground the user is returned to their most recently opened class after again seeing the splash screen, rather than again sent to the primary class
public class MainSplashScreen extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main_splash_screen);
new Handler().postDelayed(new Runnable() {
// Using handler with postDelayed called runnable run method
@Override
public void run() {
Intent i = new Intent(MainSplashScreen.this, FirstScreen.class);
startActivity(i);
// close this activity
finish();
}
}, 5*1000); // wait for 5 seconds
}
@Override
protected void onDestroy() {
super.onDestroy();