I don't want the app to run the MainActivity while I pressed home in SplashScreen just like WhatsApp

i don't care lyrics
i don't know
i don't care i love it
justin bieber i don't care
ed sheeran
i don't care live
i don't care song
i don't care apocalyptica

I have put onPause in the SplashScreen activity to override the MainActivity but it won't work. and I've searched the internet but still not find how to do it. it always start MainActivity even if I've pushed the home button

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_splash_screen);

    Thread splashScreenThread = new Thread() {
        @Override
        public void run() {
            try {
                sleep(2000);
                super.run();
            } catch (InterruptedException e) {
                Log.e(this.getClass().getSimpleName(), "showSplashScreen: " + e.getMessage());
            } finally {
                Intent moveToHomeActivityIntent = new Intent(SplashScreenActivity.this, HomeActivity.class);
                startActivity(moveToHomeActivityIntent);
                finish();
            }
        }
    };
    splashScreenThread.start();
}

@Override
protected void onPause(){
    super.onPause();
    finish();
}

Please try with this will working

new Handler().postDelayed(new Runnable() {
        @Override
        public void run() {
            startActivity(new Intent(getApplicationContext(), HomeActivity.class));
            finish();
        }
    }, 2000);

Ed Sheeran - I Don't Care (Live At Abbey Road), Don't like this video? Sign in to make your opinion count. Sign in. 4,726. Loading. .. Loading Duration: 5:30 Posted: Dec 6, 2019 Directed by Kelly Makin. With Denise Richards, Dean Cain, Karen Cliche, Olivia Jones. Denise Richards plays Lauren, a divorced wedding-planner who falls for the groom-to-be (Dean Cain).

Just go to your Manifest.xml and default your activity to SplashScreenActivity

Change This

<activity android:name=".MainActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
 </activity>
 <activity android:name=".SplashScreenActivity" />

to This

<activity android:name=".SplashScreenActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
 </activity>
 <activity android:name=".MainActivity" />

Charlie Puth, Get "We Don't Talk Anymore": http://smarturl.it/CharlieWDTA Voicenotes, the brand new album Duration: 3:51 Posted: Aug 2, 2016 I don’t care much for the suffering of others. And when I can help, with charity, I don’t, because I don’t really care. Don’t get me wrong, I’m not a bad person. Although I have my sins

I've found out the answer! It's so simple and easy to implement. just follow the instruction on this link Thanks @Zun for providing the reference

I Don't Care (Ed Sheeran and Justin Bieber song), Asked by interviewer Jonathan Swan how history would remember Lewis, Trump said: “I don't know John Lewis. He chose not to come to my� Saddled With Student Loans, Michael Arceneaux Worries, 'I Don't Want To Die Po Michael Arceneaux graduated from Howard University in 2007 with more than $100,000 of private student loan debt. He

President Trump swipes at John Lewis for skipping his inauguration , I Don't Care Lyrics: I'm at a party I don't wanna be at / And I don't ever wear a suit and tie, yeah / Wonderin' if I could sneak out the back� I Don’t Have Your Eyes, written by Carrie A. Kitze and illustrated by Rob Williams, is a great picture book for an interracial family. This is a book that celebrates the differences and the similarities between children and the parents who may not look like them.

Ed Sheeran & Justin Bieber – I Don't Care Lyrics, We don't need another lockdown — yet. But there's more Governor Baker could be doing to minimize a second coronavirus wave. By Larry� I Don't Even Know is developed by Element19. Release Date August 2008. Walkthrough. Controls Use your mouse to play I Don't Even Know. Show Less

We don't need another lockdown — yet, What Does She Have That I Don't? A research-based checklist for sex appeal. Posted Aug 04, 2020. Facebook icon SHARE � Twitter icon TWEET � Envelope� Sen. Rand Paul, a long-time critic of Rep. Liz Cheney, joined the conservative pile-on of the Wyoming Republican, saying on Wednesday: "I don't think she's good for the country" and accused her of

Comments
  • Somewhat related: the way you create a SplashScreen is really bad. Please take your time to read android.jlelse.eu/…. After reading this your problem will be fixed + you will have a better Splash Screen + you will have happier users (I assume you care about your users)
  • please use below code just replace your thread and remove onPause method
  • @Zun your answer really helps me, thanks a lot!
  • well, I've implemented this, but it still moves to MainActivity despite I've already at android homescreen
  • okay so please check the HomeActivity maybe you have redirect the Home to MainActivity.
  • I've found the answer, just referenced to this android.jlelse.eu/…