title: Splash Screen Activity
body: <p>I added splash screen to my application and my code looks as follow: </p>
  
  <pre><code>public class SplashActivity extends AppCompatActivity {
  
      public static final int DELAY_MILLIS = 2000;//for testing i use 5 seconds
      private Handler handler = null;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
          handler = new Handler();
          handler.postDelayed(new Runnable() {
              @Override
              public void run() {
                  Intent intent = new Intent(SplashActivity.this, CurrencyExchangeActivity.class);
                  startActivity(intent);
                  finish();
              }
          }, DELAY_MILLIS);
      }
  
      @Override
      protected void onStop() {
          super.onStop();
          handler.removeCallbacksAndMessages(null);
      }
  }
  </code></pre>
  
  <p>My Manifest :</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.vdovin.currencyratesapp"&gt;
  
      &lt;uses-permission android:name="android.permission.INTERNET"/&gt;
  
      &lt;application
          android:name=".application.CurrencyApp"
          android:allowBackup="true"
          android:icon="@mipmap/ic_launcher"
          android:label="@string/app_name"
          android:supportsRtl="true"
          android:theme="@style/AppTheme"&gt;
  
          &lt;activity
              android:name=".screens.splash.SplashActivity"
              android:theme="@style/SplashTheme"&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=".screens.main.CurrencyExchangeActivity"&gt;
          &lt;/activity&gt;
      &lt;/application&gt;
  &lt;/manifest&gt;
  </code></pre>
  
  <p>So I faced with next problem:</p>
  
  <p>If I hide my app with home button when loading splash screen, then when I open app again, splash screen activity not call <code>CurrencyExchangeActivity</code>. I understand that it appears because method <code>onCreate()</code> invoked only once, but I can't put it in <code>onResume()</code> because when I open my app again it shows me the splash screen again. But I want to show <code>CurrencyActivity</code>, like google's apps(maps, sheets etc...) </p>