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 3997966
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T07:28:00+00:00 2026-05-20T07:28:00+00:00

I have created a splashscreen for my android app. I went down the route

  • 0

I have created a splashscreen for my android app. I went down the route with an activity of it’s own displaying itself in a splashthread and then loading the “MainMenu” acitivty.
This works alright, until I want to quit the app.
When I hit the “back button” I see the MainMenu window. When I hit the “back button” a second time .. I don’t see the splashscreen I see the MainMenu once more. An additional “back” will end the app.

Not nice, are there any good hints on how to avoid that behaviour?
Best of all would of course be to end the app directly when hitting “back” form the “MainMenu” but I guess I then need to re-model the splashscreen to be a part of that activity instead?

Splashcode

   public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.splash);
    Thread splashThread = new Thread() {
       @Override
       public void run() {
          try {
             Log.d("Trying","Tries");
             int waited = 0;
             while (waited < 5000) {
                sleep(100);
                waited += 100;
             }
          } catch (InterruptedException e) {
              Log.d("Catching", e.toString());
          } finally {
             finish();
             Intent i = new Intent(UEABB.this,MainMenu.class);
             UEABB.this.startActivity(i);
             startActivity(i);

          }
       }
    };
    splashThread.start();
 }

Regards

  • 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-05-20T07:28:00+00:00Added an answer on May 20, 2026 at 7:28 am

    Try to explicitly set the android:noHistory="true" on the SplashScreen Activity in your manifest.xml. I followed a similar approach when designing my “What’s New” Activity.

    <activity android:name=".activities.WhatsNewActivity"
        android:label="Version History" android:noHistory="true">
        <intent-filter>
           <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>
    

    Nevertheless you should call finish() once you switch to another activity.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a class which extends View class. public class SplashScreen extends View
I have an app that displays a splash screen. The splash screen activity creates
I have created an android application that calls (using kSOAP library) a SOAP based
i have created an app which works fully on the basis of an RSS
I have a question that I have a splash screen in my android app
I have problem running my app on Android 2.3 (Gingerbread). The app has a
I am new to Android and Java. I have constructed an app using HTML/Javascript
I have an Android app where I've extended the base Application class in order
I have created a QWidget with a bunch of QToolButtons in it and I
I have created 3 classes as following Ext.mine.TextParent - Inherting from Textfield Ext.mine.child.TextChildA -

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.