I am creating an application that requires user authentication. The first time a user opens the application, you must log in or register in order to go to the main screen of the application, which downloads some messages.
I should mention that the main screen should be FragmentActivity so that the user can move between 2-3 tabs .. this means that I have to have another action (for the login or registration screen) to allow the user to continue working home.
MainActivity | | --> Check If user logged in | | | | | --> Start Login Activity (Or Register From Here) | --> Start Home Activity (FragmentActivity with 2-3 tabs-fragments)
Right now in the main event, I am looking at general settings if the user is already logged in, and then I start FragmentActivity or login activity if the user is not logged in.
I don't know if this is a problem, but when one of these two actions is running, if I click it, it goes to a blank screen and nothing happens. It seems logical because it is MainActivity and its actually empty. I only have an if statement to jump to the corresponding action.
Is this a good approach or should I develop it in another way?
android android-activity login android-fragmentactivity
Michalis Daniilakis Dec 02 '13 at 17:58
source share