title: Android firebase onStart and onStop explanation
body: <p>I've just started with firebase in android and i can't understand some things in onStart and in onStop. </p>
  
  <p>Why is it necessary to have this code on stop method? Why do we need to remove listener ?</p>
  
  <pre><code>@Override
  protected void onStop() {
      super.onStop();
      Log.d(TAG, "onStop: ");
      if(mAuthStateListener != null)
          mAuth.removeAuthStateListener(mAuthStateListener);
  }
  </code></pre>
  
  <p>And one more question what is the advantage of setting up mAuth listener in onStart method instead of onCreate ?</p>
  
  <pre><code>@Override
  protected void onStart() {
      super.onStart();
      Log.d(TAG, "onStart: ");
      mAuth.addAuthStateListener(mAuthStateListener);
  }﻿
  </code></pre>
  
  <p>This is how they shoved in Firebase -> Authentication demo.</p>