title: How to Add Application StartUp Image in Android Mobile?
body: <p>I am developing an android app, which at the moment when it is loading the Aplication, I just have a black screen (until the app gets its footing). I want to display a full screen image when black screen appears on the Emulator/Android Mobile. Looking at other apps they have a company logo or cool image that pops up for a few seconds, can someone tell me how to do this please?</p>
  
  <p>I use this code:</p>
  
  <pre class="lang-java prettyprint-override"><code>public class SplashScreen extends Activity {
      /**
       * The thread to process splash screen events
       */
      private Thread mSplashThread;    
  
      /** Called when the activity is first created. */
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          // Splash screen view
          setContentView(R.layout.activity_splash_screen);
  
          final SplashScreen sPlashScreen = this;   
  
          // The thread to wait for splash screen events
          mSplashThread =  new Thread(){
              @Override
              public void run(){
                  try {
                      synchronized(this){
                          // Wait given period of time or exit on touch
                          wait(3000);
                      }
                  }
                  catch(InterruptedException ex){                    
                  }
  
                  finish();
  
                  // Run next activity
                  Intent intent = new Intent();
                  intent.setClass(sPlashScreen, HomePage.class);
                  startActivity(intent);
  
              }
          };
  
          mSplashThread.start();        
      }
  
      /**
       * Processes splash screen touch events
       */
      @Override
      public boolean onTouchEvent(MotionEvent evt) {
          if(evt.getAction() == MotionEvent.ACTION_DOWN) {
              synchronized(mSplashThread){
                  mSplashThread.notifyAll();
              }
          }
          return true;
      }    
  } 
  </code></pre>