I have my app, first time its opened it opens splash screen ( activity 1) and moves to second page(activity 2) to ask for username/password.User loggs in i save things in sharedpreferences ( sessionid). Later when the app is closed, and reopened same thing splash screen(activity 1) is opened however this time since user already logged in ( i get to read sessionid via sharedpreferences on splash screen) i automatically take him in to activity 3.
My problem is , i am doing on splash screen the check whether he is already logged in or not. i want to remove splash screen (activity 1) part. open the login screen first time ( activity 2), and if its logged in second time it opens the app directly to (activity 3). How can I do this? Just like gmail?