title: What code do I put in manifest android file on launch to have splash screen?
body: <p>I already looked up similar posts on SO. I have added splash.java class,
   splash_layout.xml file, </p>
  
  <p><strong>i had 2 app icons appearing on desktop emulator and splash was there, but 2 icons is not good</strong>
  I suspect it is about manifest, what do I put in there as android.MAIN, android.DEFAULT?</p>
  
  <p>This is my android manifest.xml file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.example.kaban.it_ebooksinfomobile" &gt;
  
  &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
  
  &lt;application
      android:allowBackup="true"
      android:icon="@drawable/logo"
      android:label="@string/app_name"
      android:theme="@style/Theme.Book"&gt;
  
  
      &lt;something must be here for splash screen before MainActivity...&gt;
  
      &lt;activity
          android:name=".MainActivity"
          android:label="@string/app_name" &gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.MAIN" /&gt;
  
              &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
  </code></pre>
  
  <p>This is splash java file:</p>
  
  <pre><code>package com.example.kaban.it_ebooksinfomobile;
  
  import android.app.Activity;
  import android.content.Intent;
  import android.os.Bundle;
  import android.os.Handler;
  
  public class SplashScreen extends Activity {
  
  
      private final int SPLASH_DISPLAY_LENGTH = 1000;
      private static boolean splashLoaded = false;
  
  
      @Override
      public void onCreate(Bundle icicle) {
          super.onCreate(icicle);
  
          if(!splashLoaded){
              setContentView(R.layout.splashscreen);
              splashLoaded = true ;
  
          /* New Handler to start the Menu-Activity
           * and close this Splash-Screen after some seconds.*/
              new Handler().postDelayed(new Runnable(){
                  @Override
                  public void run() {
                  /* Create an Intent that will start the Menu-Activity. */
                      startActivity(new Intent(SplashScreen.this, MainActivity.class));
                      finish();
                  }
              }, SPLASH_DISPLAY_LENGTH);
          }
          else {
              Intent goToMainActivity = new Intent(SplashScreen.this, MainActivity.class);
              goToMainActivity.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
              startActivity(goToMainActivity);
              finish();
          }
  
      }
  }
  </code></pre>
  
  <p>But it still does not load my splash! it used to load, but with 2 app icons on virtual emulator desktop, which is stupid.
  I don't think it s right to make my .SplashActivity my launcher, i already did this:</p>
  
  <pre><code>&lt;activity
              android:name=".HomeScreen"
              android:label="@string/app_name" &gt;&gt;     
          &lt;/activity&gt;
  
          &lt;activity
              android:name=".Splash"
              android:label="@string/title_activity_splash_screen" &gt;&gt;     
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;&gt;     
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt; /activity&gt;
  </code></pre>