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

  • Home
  • SEARCH
  • 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 9205753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:01:32+00:00 2026-06-18T00:01:32+00:00

I have an app with three activities: splashscreen (default), login, main. The application starts

  • 0

I have an app with three activities: splashscreen (default), login, main. The application starts with splash, after some seconds changes to login. If the login process is correct then we go to main.

My problem is the login activity cannot be recovered from a paused state. When I hit the Home button the onPause() is called correctly and onDestroy() is not called. Then when trying to return to the application, it starts on splash but never reaches login, it just goes back to Home. The logcat doesn’t show any error and the debugger states the application is still open (like it should). The behavior on the splash and main screens is the expected.

public class LoginActivity extends Activity {
/* UI ELEMENTS */
private OnClickListener mOnClickListener;

private EditText mPasswordField;

private EditText mUserField;

private ProgressDialog mProgressDialog;

/* LOGIC ELEMENTS */
/** handler to update interface */
private static Handler sInterfaceUpdateHandler;


public static class UpdateHandler extends Handler {

    private final WeakReference<LoginActivity> mLogin;

    UpdateHandler(final LoginActivity loginActivity) {
        super();
        mLogin = new WeakReference<LoginActivity>(loginActivity);
    }

    /**
     * handle events from other threads in UI thread.
     * 
     * @param message message data. Property what determines action.
     */
    @Override
    public void handleMessage(final Message message) {
       // STUFF HERE
    }


@Override
public void onCreate(final Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    this.initializeInterface(); // fields filled here, listener added to buttons
}

EDIT: Activity creation in SplashScreen as per request

 public class SplashScreen extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(final Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    this.setContentView(R.layout.splashscreen);
    final Thread splashThread = new Thread() {
        @Override
        public void run() {
            try {
                int waited = 0;
                while (waited < 2000) {
                    sleep(100);
                    waited += 100;
                }
            } catch (final InterruptedException catchException) {
                LoggerFactory.consoleLogger().printStackTrace(catchException);
            }
            SplashScreen.this.finish();
            final Intent loginIntent = new Intent(SplashScreen.this, LoginActivity.class);
            SplashScreen.this.startActivity(loginIntent);
        }
    };
    splashThread.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-18T00:01:33+00:00Added an answer on June 18, 2026 at 12:01 am

    Error found and fixed. The activity was marked as SingleInstance in the manifest. I changed it to SingleTop and now it works as expected.

    More documentation on the cause can be found here: http://developer.android.com/guide/topics/manifest/activity-element.html#lmode

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

Sidebar

Related Questions

I have three activities in my android app. First activity is main application screen
My app has three tabs, A, B, C that have three distinct activities. Tab
I have three activities where the first activity is the welcome app page(SavingsGuiderSplashActivity) which
The app that I am developing is messing with me. I have three activities
in my app i am having three main activities named as Home, List and
I have an android APP, with a lot of activities. In the login activiti
I have a an app that starts with a MapActivity showing some POI's on
in my app i have three activities named as Home, SignIn and Add Page.
I have created three Activities for an Android app: BaseballCardsList, BaseballCardsDetails, and FilterBaseballCards. BaseballCardsList
I am writing my first Android app. I have three Activities: BaseballCardList, BaseballCardDetails, and

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.