title: Splash screen activity ignored when resuming application - Android
body: <p>I am wondering why my application ignores my SplashScreen.java activity when resuming the aplication. If I close it with the "Back" button, the splash screen comes up on start, but if I exit with the home button the SplashScreen activity is not being called...:(</p>
  
  <p>I even added the onResume event, but the splash screen still wont come up when resuming my app.
  Thanks!!</p>
  
  <p>SplashScreen.java</p>
  
  <pre><code>public class Splash extends Activity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_splash);
          spashStart();
  
      }
  
      protected void onResume(){
          super.onResume();
          spashStart();
          }   
  
  
      private void spashStart() {
          Thread splashTimer = new Thread() {
              public void run(){
                  try{
                      sleep(5000);
                      Intent mainActivity = new Intent("com.exploreca.tourfinder.MainActivity");
                      startActivity(mainActivity);
                  } catch (InterruptedException e) {
                      // TODO Auto-generated catch block
                      e.printStackTrace();
                  } finally {
                    finish();
                  }
              }
          };
          splashTimer.start();
      }
  
  }
  </code></pre>
  
  <p>Maifest:</p>
  
  <pre><code>...
  
  &lt;uses-sdk
          android:minSdkVersion="14"
          android:targetSdkVersion="19" /&gt;
  
      &lt;application
          android:allowBackup="true"
          android:icon="@drawable/scena_logo"
          android:label="@string/app_name"
          android:theme="@style/AppTheme" &gt; 
          &lt;activity
              android:name="com.exploreca.tourfinder.Splash"
              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;    
          &lt;activity
              android:name=".MainActivity"
              android:label="@string/app_name" &gt;            
              &lt;intent-filter&gt;
                  &lt;action android:name="com.exploreca.tourfinder.MainActivity" /&gt;
                  &lt;category android:name="android.intent.category.DEFAULT" /&gt;
              &lt;/intent-filter&gt;            
          &lt;/activity&gt;
          &lt;activity 
              android:name=".SettingsActivity"
              android:parentActivityName="com.exploreca.tourfinder.MainActivity"&gt;            
          &lt;/activity&gt;
          &lt;activity 
              android:name=".TourDetailActivity"
              android:parentActivityName="com.exploreca.tourfinder.MainActivity"&gt;            
          &lt;/activity&gt;  
          &lt;activity 
              android:name=".NotificationDetails"
              android:label="@string/title_activity_notifDetails_title"
              android:parentActivityName="com.exploreca.tourfinder.MainActivity"&gt;            
          &lt;/activity&gt;  
          &lt;activity 
              android:name=".SavedEvents"
              android:label="@string/title_activity_SavedEvents" 
              android:parentActivityName="com.exploreca.tourfinder.MainActivity"&gt;            
          &lt;/activity&gt;    
          &lt;activity 
              android:name=".FollowList"
              android:label="@string/title_activity_Urmarite" 
              android:parentActivityName="com.exploreca.tourfinder.MainActivity"&gt;            
          &lt;/activity&gt;    
  
  
  ...
  </code></pre>