Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8947785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T12:51:20+00:00 2026-06-15T12:51:20+00:00

I have a splash screen that i want to run before my main app

  • 0

I have a splash screen that i want to run before my main app screen. However, when the timer ends, the applicaiton crashes. Any ideas on why this happens? Thanks in advance.

Below is the referenced code

public class Splash extends Activity {

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

        Thread timer = new Thread() {
            // Whatever is enclosed in the {} of method run(), runs when we
            // start the application
            public void run() {
                try {
                    sleep(2000);

                } catch (InterruptedException e) {
                    e.printStackTrace();

                } finally {

                    Intent openMainScreen = new Intent("com.package.Main_Screen");
                    startActivity(openMainScreen);

                }
            }
        };

        timer.start();
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T12:51:21+00:00Added an answer on June 15, 2026 at 12:51 pm

    Why don’t you simply use this kind of Intent,

    Intent openMainScreen = new Intent(Splash.this,Main_Screen.class);
    startActivity(openMainScreen);
    

    And also make sure you you have added the Activity in your manifest like this,

    <activity android:name=".Main_Screen">
     </activity>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an app that displays a splash screen. The splash screen activity creates
I have a question that I have a splash screen in my android app
I have a splash image that I want to display when the app is
i have a splash screen that has some code that i only want called
I have splash.png and want that this image take all place on the screen
I have a splash screen for my program that I want to have a
I want to show the Splash Screen in iPad application. Before that i want
I have a splash screen that I would like to fade in, while my
I have a 2 part splash screen that I've been trying to get to
I have a label on a splash screen that is displayed for 4 seconds.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.