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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:43:58+00:00 2026-06-15T21:43:58+00:00

I have an Android app with 2 primary activities. When the app starts from

  • 0

I have an Android app with 2 primary activities. When the app starts from scratch, both activities start and run just fine. Something like: A -> B. Activity A does all of the initialization needed for both A & B. All of my local testing on real hardware and emulator, A is always created (onCreate) before B is created.

However, on my app’s crash report, I see an exception which can only be explained by B being started without or before A. Is this possible? Will Android create an internal Activity without creating the other activities for my app (B without A)? Is the order of Activity creation guaranteed (A then B)? How would I re-create either of these scenarios using the emulator or real hardware?

I can easily move my initialization code to work regardless of which Activity is started first, BUT I wanted to learn how to reproduce and test before making changes. I looked through the documentation but it didn’t really help.

Here is the code that starts task B when user presses “play” button:

private void handlePlayTouch()
{
    Intent intent = new Intent(getApplicationContext(), PlayActivity.class);
    startActivity(intent);      
}
  • 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-15T21:43:59+00:00Added an answer on June 15, 2026 at 9:43 pm

    After you started Activity B, you press home button and make your application in the background. The system would kill your application if the free memory is very low. If you tried to switch to your application after your application killed, the system would try to restore your application and activity B without create A first.

    You can use DDMMS’s Devices view to manually stop your application, there’s a red “stop process” button.Make sure that you should make your application in the background.

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

Sidebar

Related Questions

I have an Android app with a UI like this for viewing emails: I'm
I have a android app that is quite simple it fetches data from the
I have android app which works fine. And now I want to add some
I have an Android app that I have just prepared for localization, with one
I have an android app and I would like to implement the search function.
I'm using Eclipse to develop an Android app to plot Bluetooth data. The primary
i'm writing an Android app and i've run into a bit of a roadblock
I have 2 Android Databases in my app. For the sake of an example,
I have an Android app that references to a library Android project. That setup
I have an android app through which I can successfully update the twitter status.

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.