title: Changing launcher activity when the app is launched second time onwards android
body: <p>I am developing an android app where I have a launcher activity that takes the user's email id. When the user enters his email id he is redirected to another activity that asks for another user authentication in a <code>WebView</code>. After the user is successfully authenticated from this activity, the further execution starts. </p>
  
  <p>Now, I want that after the user is authenticated on the second activity and he closes the app. Next time when he starts the app he should not see the launcher activity and get redirected to the second activity.</p>
  
  <p>Is there any way to do this?
  Thanks</p>
  
  <p>My code:-</p>
  
  <pre><code>Animation animTranslate  = AnimationUtils.loadAnimation(Login.this, R.anim.translate);
      animTranslate.setAnimationListener(new AnimationListener() 
      {
  
          @Override
          public void onAnimationStart(Animation arg0) { }
  
          @Override
          public void onAnimationRepeat(Animation arg0) { }
  
          @Override
          public void onAnimationEnd(Animation arg0) 
          {
  
                  if(LoadUserEmail()==null)
                  {
                      LoginBox.setVisibility(View.VISIBLE);
                      Animation animFade  = AnimationUtils.loadAnimation(Login.this, R.anim.fade);
                      LoginBox.startAnimation(animFade);
                  }
                  else
                  {
                      Intent myIntent = new Intent(Login.this, Details1.class);
                      startActivity(myIntent);
                  }
              }
  
      });
  public void onClick(View v) 
              {
                  // TODO Auto-generated method stub
                    // username, deviceId, deviceName parameters
                      boolean didItWork =true;
  
                      username = editUser.getText().toString().trim();
  
                      if(username.length()==0)
                      {
  
                          Toast.makeText(getApplicationContext(), "Please enter a valid email address", Toast.LENGTH_LONG).show();
                          didItWork = false;
                      }
  
  
                      else
                      {
                      isUserSaved = true;
                      didItWork = true;
                      SaveUsersEmail(username);
                      checkUsername = LoadUserEmail();
  }
  
   public void SaveUsersEmail(String username)
       {
           PreferenceManager.getDefaultSharedPreferences(this).edit().putString("Username",
                    username).commit();  
  
  
       }
  
  
  
  public  String LoadUserEmail()
       {
           String username = PreferenceManager.getDefaultSharedPreferences(this).getString("Username",
                   "Please login"); 
           return username;
       }
  </code></pre>