title: Android Activity Flow (Login or Register and go to Home)
body: <p>I am building an application which requires user authentication. First time a user opens the app should login or register to continue to the home screen of the app which loads some posts..</p>
  
  <p>i should mention that the home screen should be a FragmentActivity to allow user navigate between 2-3 tabs.. this means that i should have another Activity (for the login screen or register) to allow the user to continue later to home.</p>
  
  <pre><code>MainActivity
      |
      |
      --&gt; Check If user logged in
                |       |
                |       |
                |       --&gt; Start Login Activity (Or Register From Here)
                |
                --&gt; Start Home Activity (FragmentActivity with 2-3 tabs-fragments)
  </code></pre>
  
  <p>Right now in the main Activity i am checking through shared preferences if user already logged in and then i start the FragmentActivity or the login Activity if user has not logged in.</p>
  
  <p>I don't know if this is a problem, but when one of these two activities has started if i press back it goes on a blank screen and nothing happens. Seems logic because this is the MainActivity and its actually blank. i only have an if statement there to proceed to the appropriate activity.</p>
  
  <p>Is this a nice approach or should i develop this with another way?</p>