title: How can I launch the splash screen only when the app is killed or started for the first time ?
body: <p>I don't know why but the splashscreen always starts. I would like it to start only when the app is killed or runs for the first time.</p>
  
  <p>Here is my code :</p>
  
  <pre><code>public class SplashScreenActivity extends Activity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
          setContentView(R.layout.activity_splash_screen);
  
          Thread splashscreen = new Thread() {
              public void run(){
                  try{
                      int sp = 0;
                      while(sp &lt; 1000){
                          sleep(100);
                          sp = sp +100;
                      };
  
                  }
  
                  catch (InterruptedException e) {
                      e.printStackTrace();
                  }
  
                  finally{
                      finish();
                      startActivity(new Intent(SplashScreenActivity.this, TutoActivity.class));
                  }
              }
          };
  
          splashscreen.start();
      }
  </code></pre>